4 include_once(
"./Services/UIComponent/Explorer2/classes/class.ilTreeExplorerGUI.php");
77 $a_selection_gui = null,
78 $a_selection_cmd =
"selectObject",
79 $a_selection_par =
"sel_ref_id",
84 $this->tree = $DIC->repositoryTree();
85 $this->obj_definition = $DIC[
"objDefinition"];
86 $this->lng = $DIC->language();
87 $tree = $DIC->repositoryTree();
89 $objDefinition = $DIC[
"objDefinition"];
91 $this->access = $DIC->access();
92 $this->ctrl = $DIC->ctrl();
94 if (is_null($a_selection_gui)) {
95 $a_selection_gui = $a_parent_obj;
98 $this->selection_gui = is_object($a_selection_gui)
99 ? strtolower(get_class($a_selection_gui))
100 : strtolower($a_selection_gui);
101 $this->selection_cmd = $a_selection_cmd;
102 $this->selection_par = $a_selection_par;
103 parent::__construct($a_id, $a_parent_obj, $a_parent_cmd,
$tree);
111 foreach ($objDefinition->getSubObjectsRecursively(
"root") as $rtype) {
112 if ($rtype[
"name"] !=
"itgr" && !$objDefinition->isSideBlock($rtype[
"name"])) {
113 $white[] = $rtype[
"name"];
119 $this->
setPathOpen((
int) $this->tree->readRootId());
120 if ((
int)
$_GET[
"ref_id"] > 0) {
133 $this->nc_modifier = $a_val;
157 if (is_callable(
$c)) {
161 $title = $a_node[
"title"];
180 return ilObject::_getIcon($obj_id,
"tiny", $a_node[
"type"]);
194 $title = $a_node[
"title"];
202 return parent::getNodeIconAlt($a_node);
220 if ($a_node[
"child"] ==
$_GET[
"ref_id"] ||
237 if ($this->select_postvar ==
"") {
238 $ilCtrl->setParameterByClass($this->selection_gui, $this->selection_par, $a_node[
"child"]);
239 $link =
$ilCtrl->getLinkTargetByClass($this->selection_gui, $this->selection_cmd);
240 $ilCtrl->setParameterByClass($this->selection_gui, $this->selection_par,
"");
258 if (!$ilAccess->checkAccess(
'visible',
'', $a_node[
"child"])) {
278 if ($parent_obj_id > 0) {
281 $parent_type =
"dummy";
282 $this->type_grps[
"dummy"] = array(
"root" =>
"dummy");
285 if (empty($this->type_grps[$parent_type])) {
286 $this->type_grps[$parent_type] =
287 $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
291 foreach ($a_childs as $child) {
292 $g = $objDefinition->getGroupOfObj($child[
"type"]);
296 $group[$g][] = $child;
301 if (is_array($wl) && in_array(
"poll", $wl)) {
302 $this->type_grps[$parent_type][
"poll"] = array();
306 foreach ($this->type_grps[$parent_type] as
$t => $g) {
307 if (is_array($group[
$t])) {
309 include_once(
"./Services/Container/classes/class.ilContainer.php");
310 include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
312 $group = $sort->sortItems($group);
318 foreach ($group[$t] as $k => $item) {
337 if (!$ilAccess->checkAccess(
"read",
"", $a_parent_node_id)) {
341 return parent::getChildsOfNode($a_parent_node_id);
354 if ($this->select_postvar !=
"") {
358 if (!$ilAccess->hasUserRBACorAnyPositionAccess(
"read", $a_node[
"child"])) {
376 $this->highlighted_node = $a_value;
397 if (!is_array($a_types)) {
398 $a_types = array($a_types);
400 $this->clickable_types = $a_types;
444 if (!is_array($a_types)) {
445 $a_types = array($a_types);
447 $this->selectable_types = $a_types;
457 return (array) $this->selectable_types;
isNodeHighlighted($a_node)
Is node highlighted?
Explorer for selecting repository items.
isNodeSelectable($a_node)
Is node selectable?
setNodeContentModifier(callable $a_val)
Set node content modifier.
getNodeIcon($a_node)
Get node icon.
setSkipRootNode($a_val)
Set skip root node.
getNodeHref($a_node)
Get href for node.
sortChilds($a_childs, $a_parent_node_id)
Sort childs.
getHighlightedNode()
get an alternate highlighted node if $_GET["ref_id"] is not set or wrong Returns null if not set ...
setPathOpen($a_id)
Set node path to be opened.
setSelectableTypes($a_types)
Get HTML.
setHighlightedNode($a_value)
set an alternate highlighted node if $_GET["ref_id"] is not set or wrong
setTypeWhiteList($a_val)
Set type white list.
getNodeIconAlt($a_node)
Get node icon alt text.
getNodeContent($a_node)
Get node content.
getNodeContentModifier()
Get node content modifier.
static _lookupObjId($a_id)
isNodeClickable($a_node)
Is node clickable?
getNodeId($a_node)
Get id for node.
static _lookupType($a_id, $a_reference=false)
lookup object type
getRootNode()
Get root node.
getClickableTypes()
get whitelist for clickable items
Explorer class that works on tree objects (Services/Tree)
getChildsOfNode($a_parent_node_id)
Get childs of node.
getSelectableTypes()
get whitelist for clickable items
setOrderField($a_val, $a_numeric=false)
Set order field.
static _getInstance($a_obj_id)
get instance by obj_id
isNodeVisible($a_node)
Is node visible.
setClickableTypes($a_types)
set Whitelist for clickable items
setChildLimit($a_val)
Set child limit.
__construct( $a_parent_obj, $a_parent_cmd, $a_selection_gui=null, $a_selection_cmd="selectObject", $a_selection_par="sel_ref_id", $a_id="rep_exp_sel")
Constructor.
getTypeWhiteList()
Get type white list.