4 include_once(
"./Services/UIComponent/Explorer2/classes/class.ilExplorerBaseGUI.php");
35 public function __construct($a_expl_id, $a_parent_obj, $a_parent_cmd, $a_tree)
39 $this->lng = $DIC->language();
40 parent::__construct($a_expl_id, $a_parent_obj, $a_parent_cmd);
41 $this->tree = $a_tree;
61 $this->order_field = $a_val;
62 $this->order_field_numeric = $a_numeric;
82 $this->type_white_list = $a_val;
102 $this->type_black_list = $a_val;
122 $this->preload_childs = $a_val;
140 $subtree = $this->tree->getSubTree($this->
getRootNode());
141 foreach ($subtree as
$s) {
143 if (is_array($wl) && count($wl) > 0 && !in_array($s[
"type"], $wl)) {
147 if (is_array($bl) && count($bl) > 0 && in_array($s[
"type"], $bl)) {
150 $this->childs[$s[
"parent"]][] =
$s;
151 $this->all_childs[$s[
"child"]] =
$s;
154 if ($this->order_field !=
"") {
155 foreach ($this->childs as $k =>
$childs) {
161 if ($this->order_field ==
"") {
165 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 !=
"") {
190 die(
"ilTreeExplorerGUI::getSuccessorNode not implemented for order field " . $this->order_field);
193 if ($this->preloaded) {
194 $next_id = $a_node_id;
195 while (($next_id = $this->all_childs[$next_id][
"next_node_id"]) &&
$a_type !=
"" &&
196 $this->all_childs[$next_id][
"type"] !=
$a_type);
198 return $this->all_childs[$next_id];
215 if ($this->preloaded) {
216 if (is_array($this->childs[$a_parent_node_id])) {
217 return $this->childs[$a_parent_node_id];
223 if (is_array($wl) && count($wl) > 0) {
231 if (is_array($bl) && count($bl) > 0) {
232 $bl_childs =
array();
233 foreach (
$childs as $k => $c) {
234 if (!in_array($c[
"type"], $bl)) {
252 return $a_node[
"child"];
265 return $lng->txt(
"icon") .
" " .
$lng->txt(
"obj_" . $a_node[
"type"]);
275 if (!isset($this->root_node_data)) {
283 $this->root_id = $a_root;
288 return $this->root_id
290 : $this->
getTree()->readRootId();
316 return parent::getHTML();
getSuccessorNode($a_node_id, $a_type="")
Get successor node (currently only(!) based on lft/rgt tree values)
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
preloadChilds()
Preload childs.
getPreloadChilds()
Get preload childs.
__construct($a_expl_id, $a_parent_obj, $a_parent_cmd, $a_tree)
Constructor.
getTypeBlackList()
Get type black list.
if(!array_key_exists('StateId', $_REQUEST)) $id
setPathOpen($a_id)
Set node path to be opened.
setNodeOpen($a_id)
Set node to be opened (additional custom opened node, not standard expand behaviour) ...
setTypeWhiteList($a_val)
Set type white list.
setPreloadChilds($a_val)
Set preload childs.
setTypeBlackList($a_val)
Set type black list.
getNodeIconAlt($a_node)
Get node icon alt attribute.
getNodeId($a_node)
Get id for node.
Create styles array
The data for the language used.
getRootNode()
Get root node.
getOrderField()
Get order field.
Explorer class that works on tree objects (Services/Tree)
setOrderField($a_val, $a_numeric=false)
Set order field.
getChildsOfNode($a_parent_node_id)
Get childs of node.
getTypeWhiteList()
Get type white list.