ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilRepositoryExplorer Class Reference
+ Inheritance diagram for ilRepositoryExplorer:
+ Collaboration diagram for ilRepositoryExplorer:

Public Member Functions

 __construct ($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=0, $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
 __construct ($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.

Constructor & Destructor Documentation

◆ __construct()

ilRepositoryExplorer::__construct (   $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(), array, 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::__construct($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
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
global $lng
Definition: privfeed.php:17
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:

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

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

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

150  {
151  global $ilias;
152 
153  switch($a_type)
154  {
155  case "cat":
156  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "cat");
157  return $t_frame;
158 
159  case "catr":
160  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "catr");
161  return $t_frame;
162 
163  case "grp":
164  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "grp");
165  return $t_frame;
166 
167  case "grpr":
168  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "grpr");
169  return $t_frame;
170 
171  case "crs":
172  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "crs");
173  return $t_frame;
174 
175  case "crsr":
176  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent", "crsr");
177  return $t_frame;
178 
179  case 'rcrs':
180  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent",'rcrs');
181  return $t_frame;
182 
183  case 'prg':
184  $t_frame = ilFrameTargetInfo::_getFrame("RepositoryContent",'prg');
185  return $t_frame;
186 
187  default:
188  return "_top";
189  }
190  }
$a_type
Definition: workflow.php:93
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, $a_type, $ilCtrl, ilLink\_getStaticLink(), and array.

Referenced by ilPasteIntoMultipleItemsExplorer\formatObject().

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  case "grpr":
107  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
108  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "redirect");
109  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
110  return $link;
111 
112  case "crs":
113  $ilCtrl->setParameterByClass("ilobjcoursegui", "ref_id", $a_node_id);
114  $link = $ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjcoursegui"), "view");
115  $ilCtrl->setParameterByClass("ilobjcoursegui", "ref_id", $_GET["ref_id"]);
116  return $link;
117 
118  case "crsr":
119  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
120  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "redirect");
121  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
122  return $link;
123 
124  case 'rcrs':
125  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $a_node_id);
126  $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "infoScreen");
127  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
128  return $link;
129 
130  case 'prg':
131  $ilCtrl->setParameterByClass("ilobjstudyprogrammegui", "ref_id", $a_node_id);
132  $link = $ilCtrl->getLinkTargetByClass("ilobjstudyprogrammegui", "view");
133  $ilCtrl->setParameterByClass("ilobjstudyprogrammegui", "ref_id", $_GET["ref_id"]);
134  return $link;
135 
136  default:
137  include_once('./Services/Link/classes/class.ilLink.php');
138  return ilLink::_getStaticLink($a_node_id, $a_type, true);
139 
140  }
141  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
$a_type
Definition: workflow.php:93
Create styles array
The data for the language used.
+ 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 512 of file class.ilRepositoryExplorer.php.

513  {
514  if (in_array($a_node, $this->force_open_path))
515  {
516  return true;
517  }
518  return false;
519  }

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

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

409  {
410  global $lng, $ilias, $tree, $ilCtrl;
411 
412  // custom icons
413  $path = ilObject::_getIcon($a_obj_id, "tiny", "root");
414 
415  $tpl->setCurrentBlock("icon");
416  $nd = $tree->getNodeData(ROOT_FOLDER_ID);
417  $title = $nd["title"];
418  if ($title == "ILIAS")
419  {
420  $title = $lng->txt("repository");
421  }
422 
423  $tpl->setVariable("ICON_IMAGE", $path);
424  $tpl->setVariable("TXT_ALT_IMG", $lng->txt("icon")." ".$title);
425  $tpl->parseCurrentBlock();
426 
427  $tpl->setCurrentBlock("link");
428  $tpl->setVariable("TITLE", $title);
429  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", "1");
430  $tpl->setVariable("LINK_TARGET",
431  $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"));
432  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
433  $tpl->setVariable("TARGET", " target=\"_top\"");
434  $tpl->parseCurrentBlock();
435 
436  $tpl->setCurrentBlock("element");
437  $tpl->parseCurrentBlock();
438  }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
$path
Definition: aliased.php:25
$_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:17
+ Here is the call graph for this function:

◆ getImage()

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

get image path

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

References $a_type, and ilObject\_getIcon().

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

196  {
197  if ($a_type != "")
198  {
199  return ilObject::_getIcon($a_obj_id, "tiny", $a_type);
200  }
201 
202  return parent::getImage($a_name);
203  }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
$a_type
Definition: workflow.php:93
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isClickable()

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

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

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

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

◆ isVisible()

ilRepositoryExplorer::isVisible (   $a_ref_id,
  $a_type 
)

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

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

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

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

330  {
331  global $rbacsystem,$tree;
332 //vd($a_ref_id);
333 
334  if ($a_ref_id == 0)
335  {
336  return true;
337  }
338  if(!ilConditionHandler::_checkAllConditionsOfTarget($a_ref_id,$a_obj_id))
339  {
340  return false;
341  }
342  if ($rbacsystem->checkAccess("read", $a_ref_id))
343  {
344  return true;
345  }
346  else
347  {
348  return false;
349  }
350  }
static _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 447 of file class.ilRepositoryExplorer.php.

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

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