4include_once(
"./Services/UIComponent/Explorer2/classes/class.ilExplorerBaseGUI.php");
 
   30        public function __construct($a_expl_id, $a_parent_obj, $a_parent_cmd, $a_tree)
 
   32                parent::__construct($a_expl_id, $a_parent_obj, $a_parent_cmd);
 
   33                $this->tree = $a_tree;
 
   53                $this->order_field = $a_val;
 
   54                $this->order_field_numeric = $a_numeric;
 
   74                $this->type_white_list = $a_val;
 
   94                $this->type_black_list = $a_val;
 
  114                $this->preload_childs = $a_val;
 
  132                $subtree = $this->tree->getSubTree($this->
getRootNode());
 
  133                foreach ($subtree as $s)
 
  136                        if (is_array($wl) && count($wl) > 0 && !in_array($s[
"type"], $wl))
 
  141                        if (is_array($bl) && count($bl) > 0 && in_array($s[
"type"], $bl))
 
  145                        $this->childs[$s[
"parent"]][] = $s;
 
  146                        $this->all_childs[$s[
"child"]] = $s;
 
  149                if ($this->order_field != 
"")
 
  151                        foreach ($this->childs as $k => 
$childs)
 
  158                if ($this->order_field == 
"")
 
  163                        foreach ($this->all_childs as $k => $c)
 
  167                                        $this->all_childs[$prev][
"next_node_id"] = $k;
 
  169                                $this->all_childs[$k][
"prev_node_id"] = $prev;
 
  170                                $this->all_childs[$k][
"next_node_id"] = 
false;
 
  175                $this->preloaded = 
true;
 
  189                if ($this->order_field != 
"")
 
  191                        die(
"ilTreeExplorerGUI::getSuccessorNode not implemented for order field ".$this->order_field);
 
  194                if ($this->preloaded)
 
  196                        $next_id = $a_node_id;
 
  197                        while (($next_id = $this->all_childs[$next_id][
"next_node_id"]) && 
$a_type != 
"" &&
 
  198                                $this->all_childs[$next_id][
"type"] != 
$a_type);
 
  201                                return $this->all_childs[$next_id];
 
  218                if ($this->preloaded)
 
  220                        if (is_array($this->childs[$a_parent_node_id]))
 
  222                                return $this->childs[$a_parent_node_id];
 
  228                if (is_array($wl) && count($wl) > 0)
 
  239                if (is_array($bl) && count($bl) > 0)
 
  241                        $bl_childs = array();
 
  244                                if (!in_array($c[
"type"], $bl))
 
  263                return $a_node[
"child"];
 
  276                return $lng->txt(
"icon").
" ".
$lng->txt(
"obj_".$a_node[
"type"]);
 
  286                if (!isset($this->root_node_data))
 
  295                $this->root_id = $a_root;
 
  300                return $this->root_id
 
  302                        : $this->
getTree()->readRootId();
 
  313                foreach (
$path as $id)
 
  330                return parent::getHTML();
 
An exception for terminatinating execution or to throw for unit testing.
setNodeOpen($a_id)
Set node to be opened (additional custom opened node, not standard expand behaviour)
Explorer class that works on tree objects (Services/Tree)
__construct($a_expl_id, $a_parent_obj, $a_parent_cmd, $a_tree)
Constructor.
setTypeWhiteList($a_val)
Set type white list.
getRootNode()
Get root node.
preloadChilds()
Preload childs.
setPathOpen($a_id)
Set node path to be opened.
getTypeWhiteList()
Get type white list.
getNodeId($a_node)
Get id for node.
setTypeBlackList($a_val)
Set type black list.
getChildsOfNode($a_parent_node_id)
Get childs of node.
getTypeBlackList()
Get type black list.
setPreloadChilds($a_val)
Set preload childs.
getNodeIconAlt($a_node)
Get node icon alt attribute.
getOrderField()
Get order field.
getPreloadChilds()
Get preload childs.
getSuccessorNode($a_node_id, $a_type="")
Get successor node (currently only(!) based on lft/rgt tree values)
setOrderField($a_val, $a_numeric=false)
Set order field.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray