ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 144 of file class.ilRepositoryExplorer.php.

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

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

145  {
146  global $ilias;
147 
148  switch($a_type)
149  {
150  case "cat":
151  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "cat");
152  return $t_frame;
153 
154  case "catr":
155  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "catr");
156  return $t_frame;
157 
158  case "grp":
159  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "grp");
160  return $t_frame;
161 
162  case "crs":
163  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "crs");
164  return $t_frame;
165 
166  case "crsr":
167  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "crsr");
168  return $t_frame;
169 
170  case 'rcrs':
171  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent",'rcrs');
172  return $t_frame;
173 
174  case 'prg':
175  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent",'prg');
176  return $t_frame;
177 
178  default:
179  return "_top";
180  }
181  }
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 81 of file class.ilRepositoryExplorer.php.

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

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

82  {
83  global $ilCtrl;
84 
85  $ilCtrl->setTargetScript("ilias.php");
86 
87  switch($a_type)
88  {
89  case "cat":
90  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
91  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "");
92  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
93  return $link;
94 
95  case "catr":
96  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
97  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "redirect");
98  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
99  return $link;
100 
101  case "grp":
102  $ilCtrl->setParameterByClass("ilobjgroupgui", "ref_id", $a_node_id);
103  $link = $ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjgroupgui"), "");
104  $ilCtrl->setParameterByClass("ilobjgroupgui", "ref_id", $_GET["ref_id"]);
105  return $link;
106 
107  case "crs":
108  $ilCtrl->setParameterByClass("ilobjcoursegui", "ref_id", $a_node_id);
109  $link = $ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjcoursegui"), "view");
110  $ilCtrl->setParameterByClass("ilobjcoursegui", "ref_id", $_GET["ref_id"]);
111  return $link;
112 
113  case "crsr":
114  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
115  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "redirect");
116  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
117  return $link;
118 
119  case 'rcrs':
120  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
121  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "infoScreen");
122  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
123  return $link;
124 
125  case 'prg':
126  $ilCtrl->setParameterByClass("ilobjstudyprogrammegui", "ref_id", $a_node_id);
127  $link = $ilCtrl->getLinkTargetByClass("ilobjstudyprogrammegui", "view");
128  $ilCtrl->setParameterByClass("ilobjstudyprogrammegui", "ref_id", $_GET["ref_id"]);
129  return $link;
130 
131  default:
132  include_once('./Services/Link/classes/class.ilLink.php');
133  return ilLink::_getStaticLink($a_node_id, $a_type, true);
134 
135  }
136  }
$_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 503 of file class.ilRepositoryExplorer.php.

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

◆ 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 399 of file class.ilRepositoryExplorer.php.

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

400  {
401  global $lng, $ilias, $tree, $ilCtrl;
402 
403  // custom icons
404  $path = ilObject::_getIcon($a_obj_id, "tiny", "root");
405 
406  $tpl->setCurrentBlock("icon");
407  $nd = $tree->getNodeData(ROOT_FOLDER_ID);
408  $title = $nd["title"];
409  if ($title == "ILIAS")
410  {
411  $title = $lng->txt("repository");
412  }
413 
414  $tpl->setVariable("ICON_IMAGE", $path);
415  $tpl->setVariable("TXT_ALT_IMG", $lng->txt("icon")." ".$title);
416  $tpl->parseCurrentBlock();
417 
418  $tpl->setCurrentBlock("link");
419  $tpl->setVariable("TITLE", $title);
420  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", "1");
421  $tpl->setVariable("LINK_TARGET",
422  $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"));
423  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
424  $tpl->setVariable("TARGET", " target=\"_top\"");
425  $tpl->parseCurrentBlock();
426 
427  $tpl->setCurrentBlock("element");
428  $tpl->parseCurrentBlock();
429  }
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:11
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 186 of file class.ilRepositoryExplorer.php.

References ilObject\_getIcon().

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

187  {
188  if ($a_type != "")
189  {
190  return ilObject::_getIcon($a_obj_id, "tiny", $a_type);
191  }
192 
193  return parent::getImage($a_name);
194  }
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  foreach($objDefinition->getExplorerContainerTypes() as $type)
53  {
54  $this->addFilter($type);
55  }
56  $this->setFiltered(true);
58  }
59  else if ($ilSetting->get("repository_tree_pres") == "all_types")
60  {
61  foreach ($objDefinition->getAllRBACObjects() as $rtype)
62  {
63  $this->addFilter($rtype);
64  }
65  $this->setFiltered(true);
67  }
68  }
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 196 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.

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

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

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

74  {
75  $this->force_open_path = $a_path;
76  }

◆ showChilds()

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

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

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

321  {
322  global $rbacsystem,$tree;
323 //vd($a_ref_id);
324 
325  if ($a_ref_id == 0)
326  {
327  return true;
328  }
329  if(!ilConditionHandler::_checkAllConditionsOfTarget($a_ref_id,$a_obj_id))
330  {
331  return false;
332  }
333  if ($rbacsystem->checkAccess("read", $a_ref_id))
334  {
335  return true;
336  }
337  else
338  {
339  return false;
340  }
341  }
_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 438 of file class.ilRepositoryExplorer.php.

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

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