44     protected \ILIAS\DI\UIServices 
$ui;
    51         string $a_node_parameter_name = 
"node_id"    55         $this->httpRequest = $DIC->http()->request();
    56         $this->
ui = $DIC->ui();
    57         $this->
lng = $DIC->language();
    59         $this->tree = $a_tree;
    69         bool $a_numeric = 
false    71         $this->order_field = $a_val;
    72         $this->order_field_numeric = $a_numeric;
    86         $this->type_white_list = $a_val;
   104         $this->type_black_list = $a_val;
   118         $this->preload_childs = $a_val;
   128         $subtree = $this->tree->getSubTree($this->
getRootNode());
   129         foreach ($subtree as $s) {
   131             if (is_array($wl) && count($wl) > 0 && !in_array($s[
"type"], $wl)) {
   135             if (is_array($bl) && count($bl) > 0 && in_array($s[
"type"], $bl)) {
   138             $this->childs[$s[
"parent"]][] = $s;
   139             $this->all_childs[$s[
"child"]] = $s;
   142         if ($this->order_field !== 
"") {
   143             foreach ($this->childs as $k => $childs) {
   148                     $this->order_field_numeric
   154         if ($this->order_field === 
"") {
   158             foreach ($this->all_childs as $k => 
$c) {
   160                     $this->all_childs[$prev][
"next_node_id"] = $k;
   162                 $this->all_childs[$k][
"prev_node_id"] = $prev;
   163                 $this->all_childs[$k][
"next_node_id"] = 
false;
   168         $this->preloaded = 
true;
   183         if ($this->order_field !== 
"") {
   184             die(
"ilTreeExplorerGUI::getSuccessorNode not implemented for order field " . $this->order_field);
   187         if ($this->preloaded) {
   188             $next_id = $a_node_id;
   189             while (($next_id = $this->all_childs[$next_id][
"next_node_id"]) && $a_type !== 
"" &&
   190                 $this->all_childs[$next_id][
"type"] !== $a_type) {
   194                 return $this->all_childs[$next_id];
   198         return $this->
getTree()->fetchSuccessorNode($a_node_id, $a_type);
   211             if (isset($this->childs[$a_parent_node_id]) && is_array($this->childs[$a_parent_node_id])) {
   212                 return $this->childs[$a_parent_node_id];
   218         if (count($wl) > 0) {
   219             $childs = $this->tree->getChildsByTypeFilter($a_parent_node_id, $wl, $this->
getOrderField());
   221             $childs = $this->tree->getChilds($a_parent_node_id, $this->
getOrderField());
   226         if (is_array($bl) && count($bl) > 0) {
   227             $bl_childs = array();
   228             foreach ($childs as $k => 
$c) {
   237         foreach ($childs as $k => 
$c) {
   239                 $final_childs[$k] = 
$c;
   242         return $final_childs;
   267         return $a_node[
"child"];
   279         return $lng->
txt(
"icon") . 
" " . $lng->
txt(
"obj_" . ($a_node[
"type"] ?? 
''));
   289         if (!isset($this->root_node_data)) {
   300         $this->root_id = $a_root;
   305         return $this->root_id
   306             ?: $this->
getTree()->readRootId();
   333             return parent::getHTML();
   355         if ($nodeIconPath !== 
'') {
   385         if ($href !== 
'' && 
'#' !== $href) {
   386             $node = $node->withLink(
new \
ILIAS\Data\URI(ILIAS_HTTP_PATH . 
'/' . $href));
   390             $node = $node->withExpanded(
true);
   394         $cmdClass = end($nodeStateToggleCmdClasses);
   396         if (is_string($cmdClass) && $cmdClass !== 
'') {
   397             $node = $node->withAdditionalOnLoadCode(
function (
$id) use ($record, $nodeStateToggleCmdClasses, $cmdClass): 
string {
   398                 $serverNodeId = $this->
getNodeId($record);
   400                 $this->
ctrl->setParameterByClass($cmdClass, $this->node_parameter_name, $serverNodeId);
   401                 $url = $this->
ctrl->getLinkTargetByClass($nodeStateToggleCmdClasses, 
'toggleExplorerNodeState', 
'', 
true, 
false);
   402                 $this->
ctrl->setParameterByClass($cmdClass, $this->node_parameter_name, null);
   404                 $javascript = 
"il.UI.tree.registerToggleNodeAsyncAction('$id', '$url', 'prior_state');";
   420         $f = $this->
ui->factory();
   432         $tree = 
$f->tree()->expandable($label, $this)
   434             ->withHighlightOnNodeClick(
true);
   445         $priorState = (
int) ($this->httpRequest->getQueryParams()[
'prior_state'] ?? 0);
   448             if (0 === $priorState && !in_array($nodeId, $this->open_nodes)) {
   449                 $this->open_nodes[] = $nodeId;
   450             } elseif (1 === $priorState && in_array($nodeId, $this->open_nodes)) {
   451                 $key = array_search($nodeId, $this->open_nodes);
   452                 unset($this->open_nodes[
$key]);
   455             $this->store->set(
'on_' . $this->
id, serialize($this->open_nodes));
   462         $r = $this->
ui->renderer();
 isNodeRequested(string $a_node_id)
 
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node. 
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
getTypeBlackList()
Get type black list. 
 
build(\ILIAS\UI\Component\Tree\Node\Factory $factory, $record, $environment=null)
 
Class ChatMainBarProvider . 
 
getNodeIcon($a_node)
Get node icon path. 
 
matches($node)
Does a node match a search term (or is search term empty) 
 
setTypeWhiteList(array $a_val)
Set type white list. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
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) ...
 
getSuccessorNode( $a_node_id, string $a_type="")
Get successor node (currently only(!) based on lft/rgt tree values) 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getNodeIconAlt($a_node)
Get node icon alt attribute. 
 
createNode(\ILIAS\UI\Component\Tree\Node\Factory $factory, $record)
Creates at tree node, can be overwritten in derivatives if another node type should be used...
 
setPreloadChilds(bool $a_val)
 
bool $order_field_numeric
 
string $node_parameter_name
 
getNodeId($a_node)
Get id for node. 
 
getNodeContent($a_node)
Get content of a node. 
 
getRootNode()
Get root node. 
 
getNodeStateToggleCmdClasses($record)
Should return an array of ilCtrl-enabled command classes which should be used to build the URL for th...
 
This describes a Tree Control. 
 
Explorer class that works on tree objects (Services/Tree) 
 
Interface for mapping data-structures to the Tree. 
 
toggleExplorerNodeState()
Should be called by an ilCtrl-enabled command class if a tree node toggle action should be processed...
 
getChildren($record, $environment=null)
Get a list of records (that list can also be empty). 
 
setOrderField(string $a_val, bool $a_numeric=false)
 
getHTML($new=false)
Get HTML. 
 
isNodeOpen($node_id)
Get all open nodes. 
 
setTypeBlackList(array $a_val)
Set type black list. 
 
getChildsOfNode($a_parent_node_id)
Get childs of node. 
 
Psr Http Message ServerRequestInterface $httpRequest
 
getNodeHref($a_node)
Get href for node. 
 
getTypeWhiteList()
Get type white list. 
 
__construct(string $a_expl_id, $a_parent_obj, string $a_parent_cmd, ilTree $a_tree, string $a_node_parameter_name="node_id")
 
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)