ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilRepositoryExplorer Class Reference
+ Inheritance diagram for ilRepositoryExplorer:
+ Collaboration diagram for ilRepositoryExplorer:

Public Member Functions

 ilRepositoryExplorer ($a_target, $a_top_node=0)
 Constructor public. More...
 
 setForceOpenPath ($a_path)
 set force open path More...
 
 buildLinkTarget ($a_node_id, $a_type)
 note: most of this stuff is used by ilCourseContentInterface too More...
 
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 STATIC, do not use $this inside! More...
 
 getImage ($a_name, $a_type="", $a_obj_id="")
 get image path More...
 
 isClickable ($a_type, $a_ref_id, $a_obj_id=0)
 
 showChilds ($a_ref_id, $a_obj_id=0)
 
 isVisible ($a_ref_id, $a_type)
 
 formatHeader (&$tpl, $a_obj_id, $a_option)
 overwritten method from base class public More...
 
 sortNodes ($a_nodes, $a_parent_obj_id)
 sort nodes More...
 
 forceExpanded ($a_node)
 Force expansion of node. More...
 
- Public Member Functions inherited from ilExplorer
 ilExplorer ($a_target)
 Constructor public. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setAsynchExpanding ($a_val)
 Set asynch expanding. More...
 
 getAsynchExpanding ()
 Get asynch expanding. More...
 
 initItemCounter ($a_number)
 Init item counter. More...
 
 setTitle ($a_val)
 Set title. More...
 
 setTitleLength ($a_length)
 Set max title length. More...
 
 getTitleLength ()
 Get max title length. More...
 
 getTitle ()
 Get title. More...
 
 setRoot ($a_root_id)
 Set root node. More...
 
 getRoot ()
 get root id More...
 
 setOrderColumn ($a_column)
 set the order column public More...
 
 setOrderDirection ($a_direction)
 set the order direction public More...
 
 setTargetGet ($a_target_get)
 set the varname in Get-string public More...
 
 setParamsGet ($a_params_get)
 set additional params to be passed in Get-string public More...
 
 setExpandTarget ($a_exp_target)
 target script for expand icons More...
 
 setFrameUpdater ($a_up_frame, $a_up_script, $a_params="")
 Set Explorer Updater. More...
 
 highlightNode ($a_id)
 set highlighted node More...
 
 checkPermissions ($a_check)
 check permissions via rbac More...
 
 setSessionExpandVariable ($a_var_name="expand")
 set name of expand session variable More...
 
 outputIcons ($a_icons)
 output icons More...
 
 setClickable ($a_type, $a_clickable)
 (de-)activates links for a certain object type More...
 
 isVisible ($a_ref_id, $a_type)
 
 setTreeLead ($a_val)
 Set tree leading content. More...
 
 getTreeLead ()
 Get tree leading content. More...
 
 isClickable ($a_type, $a_ref_id=0)
 check if links for certain object type are activated More...
 
 setPostSort ($a_sort)
 process post sorting More...
 
 setFilterMode ($a_mode=IL_FM_NEGATIVE)
 set filter mode More...
 
 getFilterMode ()
 get filter mode More...
 
 setUseStandardFrame ($a_val)
 Set use standard frame. More...
 
 getUseStandardFrame ()
 Get use standard explorer frame. More...
 
 getChildsOfNode ($a_parent_id)
 Get childs of node. More...
 
 setOutput ($a_parent_id, $a_depth=1, $a_obj_id=0, $a_highlighted_subtree=false)
 Creates output for explorer view in admin menue recursive method public. More...
 
 modifyChilds ($a_parent_id, $a_objects)
 
 showChilds ($a_parent_id)
 determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g. More...
 
 forceExpanded ($a_obj_id)
 force expansion of node More...
 
 getMaximumTreeDepth ()
 Get maximum tree depth. More...
 
 getOutput ()
 Creates output recursive method public. More...
 
 handleListEndTags (&$a_tpl_tree, $a_cur_depth, $a_item_depth)
 handle list end tags ( and ) More...
 
 handleListStartTags (&$a_tpl_tree, $a_cur_depth, $a_item_depth)
 handle list start tags ( More...
 
 formatHeader (&$tpl, $a_obj_id, $a_option)
 Creates output for header (is empty here but can be overwritten in derived classes) More...
 
 formatObject (&$tpl, $a_node_id, $a_option, $a_obj_id=0)
 Creates output recursive method private. More...
 
 getImage ($a_name, $a_type="", $a_obj_id="")
 get image path (may be overwritten by derived classes) More...
 
 getImageAlt ($a_default_text, $a_type="", $a_obj_id="")
 get image alt text More...
 
 getNodeStyleClass ($a_id, $a_type)
 get style class for node More...
 
 buildLinkTarget ($a_node_id, $a_type)
 get link target (may be overwritten by derived classes) More...
 
 buildOnClick ($a_node_id, $a_type, $a_title)
 get onclick event handling (may be overwritten by derived classes) More...
 
 buildTitle ($a_title, $a_id, $a_type)
 standard implementation for title, may be overwritten by derived classes More...
 
 buildDescription ($a_desc, $a_id, $a_type)
 standard implementation for description, may be overwritten by derived classes More...
 
 buildSelect ($a_node_id, $a_type)
 standard implementation for adding an option select box between image and title More...
 
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 get frame target (may be overwritten by derived classes) More...
 
 createTarget ($a_type, $a_node_id, $a_highlighted_subtree=false, $a_append_anch=true)
 Creates Get Parameter private. More...
 
 setFrameTarget ($a_target)
 set target frame or not frame? More...
 
 createLines ($a_depth)
 Creates lines for explorer view private. More...
 
 is_in_array ($a_start, $a_depth)
 DESCRIPTION MISSING private. More...
 
 getIndex ($a_data)
 get index of format_options array from specific ref_id,parent_id private More...
 
 addFilter ($a_item)
 adds item to the filter public More...
 
 delFilter ($a_item)
 removes item from the filter public More...
 
 setExpand ($a_node_id)
 set the expand option this value is stored in a SESSION variable to save it different view (lo view, frm view,...) private More...
 
 forceExpandAll ($a_mode, $a_show_minus=true)
 force expandAll. More...
 
 setFiltered ($a_bool)
 active/deactivate the filter public More...
 
 checkFilter ($a_item)
 check if item is in filter private More...
 
 sortNodes ($a_nodes, $a_parent_obj_id)
 sort nodes and put adm object to the end of sorted array private More...
 

Data Fields

 $root_id
 
 $output
 
 $ctrl
 
- Data Fields inherited from ilExplorer
 $id
 
 $ilias
 
 $output
 
 $format_options
 
 $tree
 
 $target
 
 $target_get
 
 $params_get
 
 $expanded
 
 $order_column
 
 $order_direction = "asc"
 
 $expand_target
 
 $rbac_check
 
 $output_icons
 
 $expand_variable
 
 $is_clickable
 
 $post_sort
 
 $filtered = false
 
 $filter_mode
 
 $expand_all = false
 
 $root_id = null
 
 $use_standard_frame = false
 

Detailed Description

Definition at line 14 of file class.ilRepositoryExplorer.php.

Member Function Documentation

◆ buildFrameTarget()

ilRepositoryExplorer::buildFrameTarget (   $a_type,
  $a_child = 0,
  $a_obj_id = 0 
)

STATIC, do not use $this inside!

Note: this is used by course interface !?

Definition at line 150 of file class.ilRepositoryExplorer.php.

References ilExplorer\$ilias, and ilFrameTargetInfo\_getFrame().

Referenced by ilWorkspaceExplorer\formatObject(), ilPasteIntoMultipleItemsExplorer\formatObject(), ilShopBoughtObjectsGUI\showItems(), ilLMPresentationGUI\showPreconditionsOfPage(), and ilCourseContentGUI\showStartObjects().

151  {
152  global $ilias;
153 
154  switch($a_type)
155  {
156  case "cat":
157  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "cat");
158  return $t_frame;
159 
160  case "catr":
161  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "catr");
162  return $t_frame;
163 
164  case "grp":
165  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "grp");
166  return $t_frame;
167 
168  case "crs":
169  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "crs");
170  return $t_frame;
171 
172  case "crsr":
173  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "crsr");
174  return $t_frame;
175 
176  case 'rcrs':
177  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent",'rcrs');
178  return $t_frame;
179 
180  default:
181  return "_top";
182  }
183  }
static _getFrame($a_class, $a_type='')
Get content frame name.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildLinkTarget()

ilRepositoryExplorer::buildLinkTarget (   $a_node_id,
  $a_type 
)

note: most of this stuff is used by ilCourseContentInterface too

Definition at line 87 of file class.ilRepositoryExplorer.php.

References $_GET, $ilCtrl, and ilLink\_getStaticLink().

Referenced by ilPasteIntoMultipleItemsExplorer\formatObject(), ilShopBoughtObjectsGUI\showItems(), and ilLMPresentationGUI\showPreconditionsOfPage().

88  {
89  global $ilCtrl;
90 
91  $ilCtrl->setTargetScript("ilias.php");
92 
93  switch($a_type)
94  {
95  case "cat":
96  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
97  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "");
98  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
99  return $link;
100 
101  case "catr":
102  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
103  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "redirect");
104  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
105  return $link;
106 
107  case "grp":
108  $ilCtrl->setParameterByClass("ilobjgroupgui", "ref_id", $a_node_id);
109  $link = $ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjgroupgui"), "");
110  $ilCtrl->setParameterByClass("ilobjgroupgui", "ref_id", $_GET["ref_id"]);
111  return $link;
112 
113  case "crs":
114  $ilCtrl->setParameterByClass("ilobjcoursegui", "ref_id", $a_node_id);
115  $link = $ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjcoursegui"), "view");
116  $ilCtrl->setParameterByClass("ilobjcoursegui", "ref_id", $_GET["ref_id"]);
117  return $link;
118 
119  case "crsr":
120  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
121  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "redirect");
122  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
123  return $link;
124 
125  case "icrs":
126  $ilCtrl->setParameterByClass("ilobjilinccoursegui", "ref_id", $a_node_id);
127  $link = $ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjilinccoursegui"), "");
128  $ilCtrl->setParameterByClass("ilobjilinccoursegui", "ref_id", $_GET["ref_id"]);
129  return $link;
130 
131  case 'rcrs':
132  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
133  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "infoScreen");
134  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
135  return $link;
136 
137  default:
138  include_once('./Services/Link/classes/class.ilLink.php');
139  return ilLink::_getStaticLink($a_node_id, $a_type, true);
140 
141  }
142  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forceExpanded()

ilRepositoryExplorer::forceExpanded (   $a_node)

Force expansion of node.

Parameters

Definition at line 502 of file class.ilRepositoryExplorer.php.

503  {
504  if (in_array($a_node, $this->force_open_path))
505  {
506  return true;
507  }
508  return false;
509  }

◆ formatHeader()

ilRepositoryExplorer::formatHeader ( $tpl,
  $a_obj_id,
  $a_option 
)

overwritten method from base class public

Parameters
integerobj_id
integerarray options
Returns
string

Definition at line 398 of file class.ilRepositoryExplorer.php.

References $_GET, $ilCtrl, ilExplorer\$ilias, $lng, $nd, $path, $tpl, ilExplorer\$tree, and ilObject\_getIcon().

399  {
400  global $lng, $ilias, $tree, $ilCtrl;
401 
402  // custom icons
403  $path = ilObject::_getIcon($a_obj_id, "tiny", "root");
404 
405  $tpl->setCurrentBlock("icon");
406  $nd = $tree->getNodeData(ROOT_FOLDER_ID);
407  $title = $nd["title"];
408  if ($title == "ILIAS")
409  {
410  $title = $lng->txt("repository");
411  }
412 
413  $tpl->setVariable("ICON_IMAGE", $path);
414  $tpl->setVariable("TXT_ALT_IMG", $lng->txt("icon")." ".$title);
415  $tpl->parseCurrentBlock();
416 
417  $tpl->setCurrentBlock("link");
418  $tpl->setVariable("TITLE", $title);
419  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", "1");
420  $tpl->setVariable("LINK_TARGET",
421  $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"));
422  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
423  $tpl->setVariable("TARGET", " target=\"_top\"");
424  $tpl->parseCurrentBlock();
425 
426  $tpl->setCurrentBlock("element");
427  $tpl->parseCurrentBlock();
428  }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
$_GET["client_id"]
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
$nd
Definition: error.php:9
global $lng
Definition: privfeed.php:40
$path
Definition: index.php:22
+ Here is the call graph for this function:

◆ getImage()

ilRepositoryExplorer::getImage (   $a_name,
  $a_type = "",
  $a_obj_id = "" 
)

get image path

Definition at line 188 of file class.ilRepositoryExplorer.php.

References ilObject\_getIcon().

Referenced by ilWorkspaceExplorer\formatObject(), and ilPasteIntoMultipleItemsExplorer\formatObject().

189  {
190  if ($a_type != "")
191  {
192  return ilObject::_getIcon($a_obj_id, "tiny", $a_type);
193  }
194 
195  return parent::getImage($a_name);
196  }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ilRepositoryExplorer()

ilRepositoryExplorer::ilRepositoryExplorer (   $a_target,
  $a_top_node = 0 
)

Constructor public.

Parameters
stringscriptname
intuser_id

Definition at line 31 of file class.ilRepositoryExplorer.php.

References $ilCtrl, $ilSetting, $lng, ilExplorer\$tree, ilExplorer\addFilter(), IL_FM_POSITIVE, ilExplorer\setFiltered(), ilExplorer\setFilterMode(), ilExplorer\setSessionExpandVariable(), and ilExplorer\setTitle().

32  {
33  global $tree, $ilCtrl, $lng, $ilSetting, $objDefinition;
34 
35  $this->ctrl = $ilCtrl;
36 
37 
38  $this->force_open_path = array();
39 
40 
41  parent::ilExplorer($a_target);
42  $this->tree = $tree;
43  $this->root_id = $this->tree->readRootId();
44  $this->order_column = "title";
45  $this->setSessionExpandVariable("repexpand");
46  $this->setTitle($lng->txt("overview"));
47 
48  // please do not uncomment this
49  if ($ilSetting->get("repository_tree_pres") == "" ||
50  ($ilSetting->get("rep_tree_limit_grp_crs") && $a_top_node == 0))
51  {
52  $this->addFilter("root");
53  $this->addFilter("cat");
54  $this->addFilter('catr');
55  $this->addFilter('rcat');
56  $this->addFilter("grp");
57  $this->addFilter("icrs");
58  $this->addFilter('rgrp');
59  $this->addFilter("crs");
60  $this->addFilter('crsr');
61  $this->addFilter('rcrs');
62  $this->setFiltered(true);
64  }
65  else if ($ilSetting->get("repository_tree_pres") == "all_types")
66  {
67  foreach ($objDefinition->getAllRBACObjects() as $rtype)
68  {
69  $this->addFilter($rtype);
70  }
71  $this->setFiltered(true);
73  }
74  }
setFilterMode($a_mode=IL_FM_NEGATIVE)
set filter mode
const IL_FM_POSITIVE
setFiltered($a_bool)
active/deactivate the filter public
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
addFilter($a_item)
adds item to the filter public
setTitle($a_val)
Set title.
+ Here is the call graph for this function:

◆ isClickable()

ilRepositoryExplorer::isClickable (   $a_type,
  $a_ref_id,
  $a_obj_id = 0 
)

Definition at line 198 of file class.ilRepositoryExplorer.php.

References $ilDB, $ilUser, $query, $res, $row, ilExplorer\$tree, ilConditionHandler\_checkAllConditionsOfTarget(), ilContainerReferenceAccess\_isAccessible(), ilObject\_lookupObjectId(), ilObjGlossary\_lookupOnline(), and DB_FETCHMODE_OBJECT.

199  {
200  global $rbacsystem,$tree,$ilDB,$ilUser,$ilAccess;
201 
202  if(!ilConditionHandler::_checkAllConditionsOfTarget($a_ref_id,$a_obj_id))
203  {
204  return false;
205  }
206 
207  switch ($a_type)
208  {
209  case "crs":
210  return $ilAccess->checkAccess("read", "", $a_ref_id);
211 
212  // visible groups can allways be clicked; group processing decides
213  // what happens next
214  case "grp":
215  return true;
216 
217  case 'tst':
218  if(!$rbacsystem->checkAccess("read", $a_ref_id))
219  {
220  return false;
221  }
222 
223  $query = sprintf("SELECT * FROM tst_tests WHERE obj_fi=%s",$a_obj_id);
224  $res = $ilDB->query($query);
225  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
226  {
227  return (bool) $row->complete;
228  }
229  return false;
230 
231  case 'svy':
232  if(!$rbacsystem->checkAccess("read", $a_ref_id))
233  {
234  return false;
235  }
236 
237  $query = sprintf("SELECT * FROM svy_svy WHERE obj_fi=%s",$a_obj_id);
238  $res = $ilDB->query($query);
239  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
240  {
241  return (bool) $row->complete;
242  }
243  return false;
244 
245  // media pools can only be edited
246  case "mep":
247  if ($rbacsystem->checkAccess("read", $a_ref_id))
248  {
249  return true;
250  }
251  else
252  {
253  return false;
254  }
255  break;
256 
257  case 'crsr':
258  case 'catr':
259  include_once('./Services/ContainerReference/classes/class.ilContainerReferenceAccess.php');
261 
262 
263  // all other types are only clickable, if read permission is given
264  default:
265  if ($rbacsystem->checkAccess("read", $a_ref_id))
266  {
267  // check if lm is online
268  if ($a_type == "lm")
269  {
270  include_once("./Modules/LearningModule/classes/class.ilObjLearningModule.php");
271  $lm_obj =& new ilObjLearningModule($a_ref_id);
272  if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess('write',$a_ref_id)))
273  {
274  return false;
275  }
276  }
277  // check if fblm is online
278  if ($a_type == "htlm")
279  {
280  include_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
281  $lm_obj =& new ilObjFileBasedLM($a_ref_id);
282  if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess('write',$a_ref_id)))
283  {
284  return false;
285  }
286  }
287  // check if fblm is online
288  if ($a_type == "sahs")
289  {
290  include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
291  $lm_obj =& new ilObjSAHSLearningModule($a_ref_id);
292  if((!$lm_obj->getOnline()) && (!$rbacsystem->checkAccess('write',$a_ref_id)))
293  {
294  return false;
295  }
296  }
297  // check if glossary is online
298  if ($a_type == "glo")
299  {
300  $obj_id = ilObject::_lookupObjectId($a_ref_id);
301  include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
302  if((!ilObjGlossary::_lookupOnline($obj_id)) &&
303  (!$rbacsystem->checkAccess('write',$a_ref_id)))
304  {
305  return false;
306  }
307  }
308 
309  return true;
310  }
311  else
312  {
313  return false;
314  }
315  break;
316  }
317  }
Class ilObjLearningModule.
File Based Learning Module (HTML) object.
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
static _lookupObjectId($a_ref_id)
lookup object id
_checkAllConditionsOfTarget($a_target_ref_id, $a_target_id, $a_target_type="", $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
static _isAccessible($a_ref_id)
Check if target is accessible and not deleted.
_lookupOnline($a_id)
check wether content object is online
global $ilUser
Definition: imgupload.php:15
global $ilDB
Class ilObjSCORMLearningModule.
+ Here is the call graph for this function:

◆ isVisible()

ilRepositoryExplorer::isVisible (   $a_ref_id,
  $a_type 
)

Definition at line 342 of file class.ilRepositoryExplorer.php.

References $ilSetting, ilExplorer\$tree, ilEventItems\_getItemsOfContainer(), and ilItemGroupItems\_getItemsOfContainer().

343  {
344  global $ilAccess,$tree,$ilSetting;
345 
346  if(!$ilAccess->checkAccess('visible', '', $a_ref_id))
347  {
348  return false;
349  }
350 
351  $is_course = false;
352  $container_parent_id = $tree->checkForParentType($a_ref_id,'grp');
353  if(!$container_parent_id)
354  {
355  $is_course = true;
356  $container_parent_id = $tree->checkForParentType($a_ref_id,'crs');
357  }
358  if($container_parent_id)
359  {
360  // do not display session materials for container course/group
361  if($ilSetting->get("repository_tree_pres") == "all_types" && $container_parent_id != $a_ref_id)
362  {
363  // get container event items only once
364  if(!isset($this->session_materials[$container_parent_id]))
365  {
366  include_once './Modules/Session/classes/class.ilEventItems.php';
367  $this->session_materials[$container_parent_id] = ilEventItems::_getItemsOfContainer($container_parent_id);
368  }
369  // get item group items only once
370  if(!isset($this->item_group_items[$container_parent_id]))
371  {
372  include_once './Modules/ItemGroup/classes/class.ilItemGroupItems.php';
373  $this->item_group_items[$container_parent_id] = ilItemGroupItems::_getItemsOfContainer($container_parent_id);
374  }
375  if(in_array($a_ref_id, $this->session_materials[$container_parent_id]))
376  {
377  return false;
378  }
379  if(in_array($a_ref_id, $this->item_group_items[$container_parent_id]))
380  {
381  return false;
382  }
383  }
384  }
385 
386  return true;
387  }
_getItemsOfContainer($a_ref_id)
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ setForceOpenPath()

ilRepositoryExplorer::setForceOpenPath (   $a_path)

set force open path

Definition at line 79 of file class.ilRepositoryExplorer.php.

80  {
81  $this->force_open_path = $a_path;
82  }

◆ showChilds()

ilRepositoryExplorer::showChilds (   $a_ref_id,
  $a_obj_id = 0 
)

Definition at line 319 of file class.ilRepositoryExplorer.php.

References ilExplorer\$tree, and ilConditionHandler\_checkAllConditionsOfTarget().

320  {
321  global $rbacsystem,$tree;
322 //vd($a_ref_id);
323 
324  if ($a_ref_id == 0)
325  {
326  return true;
327  }
328  if(!ilConditionHandler::_checkAllConditionsOfTarget($a_ref_id,$a_obj_id))
329  {
330  return false;
331  }
332  if ($rbacsystem->checkAccess("read", $a_ref_id))
333  {
334  return true;
335  }
336  else
337  {
338  return false;
339  }
340  }
_checkAllConditionsOfTarget($a_target_ref_id, $a_target_id, $a_target_type="", $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
+ Here is the call graph for this function:

◆ sortNodes()

ilRepositoryExplorer::sortNodes (   $a_nodes,
  $a_parent_obj_id 
)

sort nodes

public

Parameters

Definition at line 437 of file class.ilRepositoryExplorer.php.

References $t, ilContainerSorting\_getInstance(), and ilObject\_lookupType().

438  {
439  global $objDefinition;
440 
441  if ($a_parent_obj_id > 0)
442  {
443  $parent_type = ilObject::_lookupType($a_parent_obj_id);
444  }
445  else
446  {
447  $parent_type = "dummy";
448  $this->type_grps["dummy"] = array("root" => "dummy");
449  }
450 
451  if (empty($this->type_grps[$parent_type]))
452  {
453  $this->type_grps[$parent_type] =
454  $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
455  }
456  $group = array();
457 
458  foreach ($a_nodes as $node)
459  {
460  $g = $objDefinition->getGroupOfObj($node["type"]);
461  if ($g == "")
462  {
463  $g = $node["type"];
464  }
465  $group[$g][] = $node;
466  }
467 
468  $nodes = array();
469  foreach ($this->type_grps[$parent_type] as $t => $g)
470  {
471  if (is_array($group[$t]))
472  {
473  // do we have to sort this group??
474  include_once("./Services/Container/classes/class.ilContainer.php");
475  include_once("./Services/Container/classes/class.ilContainerSorting.php");
476  $sort = ilContainerSorting::_getInstance($a_parent_obj_id);
477  $group = $sort->sortItems($group);
478 
479  // need extra session sorting here
480  if ($t == "sess")
481  {
482 
483  }
484 
485  foreach ($group[$t] as $k => $item)
486  {
487  $nodes[] = $item;
488  }
489  }
490  }
491 
492  return $nodes;
493  //return parent::sortNodes($a_nodes,$a_parent_obj_id);
494  }
static _lookupType($a_id, $a_reference=false)
lookup object type
static _getInstance($a_obj_id)
get instance by obj_id
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilRepositoryExplorer::$ctrl

Definition at line 24 of file class.ilRepositoryExplorer.php.

◆ $output

ilRepositoryExplorer::$output

Definition at line 23 of file class.ilRepositoryExplorer.php.

◆ $root_id

ilRepositoryExplorer::$root_id

Definition at line 22 of file class.ilRepositoryExplorer.php.


The documentation for this class was generated from the following file: