ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilExplorerBaseGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilExplorerBaseGUI:
+ Collaboration diagram for ilExplorerBaseGUI:

Public Member Functions

 setChildLimit (int $a_val)
 
 getChildLimit ()
 
 setSearchTerm (string $a_val)
 
 getSearchTerm ()
 
 setMainTemplate (?ilGlobalTemplateInterface $a_main_tpl=null)
 
 getRootNode ()
 Get root node. More...
 
 getChildsOfNode ($a_parent_node_id)
 Get children of node. More...
 
 getNodeContent ($a_node)
 Get content of a node. More...
 
 getNodeId ($a_node)
 Get id of a node. More...
 
 getNodeHref ($a_node)
 Get href for node. More...
 
 nodeHasVisibleChilds ($a_node)
 Node has children Please note that this standard method may not be optimal depending on what a derived class does in isNodeVisible. More...
 
 sortChilds (array $a_childs, $a_parent_node_id)
 Sort childs. More...
 
 getNodeIcon ($a_node)
 Get node icon path. More...
 
 getNodeIconAlt ($a_node)
 Get node icon alt attribute. More...
 
 getNodeTarget ($a_node)
 Get node target (frame) attribute. More...
 
 getNodeOnClick ($a_node)
 Get node onclick attribute. More...
 
 isNodeVisible ($a_node)
 Is node visible? More...
 
 isNodeHighlighted ($a_node)
 Is node highlighted? More...
 
 isNodeClickable ($a_node)
 Is node clickable? More...
 
 getId ()
 Get id of explorer element. More...
 
 setSkipRootNode (bool $a_val)
 
 getSkipRootNode ()
 
 setAjax (bool $a_val)
 
 getAjax ()
 
 setSecondaryHighlightedNodes (array $a_val)
 Set secondary (background) highlighted nodes. More...
 
 getSecondaryHighlightedNodes ()
 Get secondary (background) highlighted nodes. More...
 
 setNodeOpen ($a_id)
 Set node to be opened (additional custom opened node, not standard expand behaviour) More...
 
 setSelectMode (string $a_postvar, bool $a_multi=false)
 Set select mode (to deactivate, pass an empty string as postvar) More...
 
 setNodeSelected ($a_id)
 Set node to be opened (additional custom opened node, not standard expand behaviour) More...
 
 setOfflineMode (bool $a_val)
 
 getOfflineMode ()
 
 handleCommand ()
 Handle explorer internal command. More...
 
 getContainerId ()
 
 openNode ()
 Open node. More...
 
 closeNode ()
 Close node. More...
 
 getNodeAsync ()
 Get node asynchronously. More...
 
 beforeRendering ()
 Before rendering. More...
 
 getOnLoadCode ()
 Get on load code. More...
 
 getHTML ()
 
 renderNode ($a_node, ilTemplate $tpl)
 Render node. More...
 
 renderChilds ($a_node_id, ilTemplate $tpl)
 Render childs. More...
 
 getDomNodeIdForNodeId ($a_node_id)
 Get DOM node id for node id. More...
 
 getNodeIdForDomNodeId (string $a_dom_node_id)
 Get node id for dom node id. More...
 
 listItemStart (ilTemplate $tpl, $a_node)
 List item start. More...
 
 listItemEnd (ilTemplate $tpl)
 
 listStart (ilTemplate $tpl)
 
 listEnd (ilTemplate $tpl)
 
 isNodeOnclickEnabled ()
 
 setNodeOnclickEnabled (bool $nodeOnclickEnabled)
 
 isEnableDnd ()
 
 setEnableDnd (bool $enable_dnd)
 

Static Public Member Functions

static getLocalExplorerJsPath ()
 
static getLocalJsTreeJsPath ()
 
static getLocalJsTreeCssPath ()
 
static createHTMLExportDirs (string $a_target_dir)
 
static init (?ilGlobalTemplateInterface $a_main_tpl=null)
 

Protected Member Functions

 isNodeSelectable ($a_node)
 Is node selectable? More...
 
 getNodeToggleOnClick ($a_node)
 Get onclick attribute for node toggling. More...
 
 getSelectOnClick ($a_node)
 Get onclick attribute for selecting radio/checkbox. More...
 
 isNodeOpen ($node_id)
 Get all open nodes. More...
 
 getJSTreePlugins ()
 
 isNodeRequested (string $a_node_id)
 

Protected Attributes

string $node_parameter_name
 
ilLogger $log
 
ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
bool $skip_root_node = false
 
bool $ajax = false
 
array $custom_open_nodes = array()
 
array $selected_nodes = array()
 
string $select_postvar = ""
 
bool $offline_mode = false
 
array $sec_highl_nodes = array()
 
bool $enable_dnd = false
 
string $search_term = ""
 
array $open_nodes = []
 
ilSessionIStorage $store
 
bool $select_multi = false
 
 $parent_obj
 
int $child_limit = 0
 
string $parent_cmd = ''
 
string $requested_exp_cmd = ""
 
string $requested_exp_cont = ""
 
string $requested_searchterm = ""
 
string $requested_node_id = ""
 
string $id
 

Static Protected Attributes

static string $js_tree_path = "./node_modules/jstree/dist/jstree.js"
 
static string $js_tree_path_css = "./node_modules/jstree/dist/themes/default/style.min.css"
 
static string $js_expl_path = "assets/js/Explorer2.js"
 

Private Attributes

bool $nodeOnclickEnabled
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning The class is supposed to work on a hierarchie of nodes that are identified by IDs. Whether nodes are represented by associative arrays or objects is not defined by this abstract class.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Deprecated:
10

Definition at line 28 of file class.ilExplorerBaseGUI.php.

Member Function Documentation

◆ beforeRendering()

ilExplorerBaseGUI::beforeRendering ( )

Before rendering.

Definition at line 504 of file class.ilExplorerBaseGUI.php.

Referenced by getHTML(), and getNodeAsync().

504  : void
505  {
506  }
+ Here is the caller graph for this function:

◆ closeNode()

ilExplorerBaseGUI::closeNode ( )

Close node.

Definition at line 465 of file class.ilExplorerBaseGUI.php.

References exit, and getNodeIdForDomNodeId().

465  : void
466  {
467  $id = $this->getNodeIdForDomNodeId($this->requested_node_id);
468  if (in_array($id, $this->open_nodes)) {
469  $k = array_search($id, $this->open_nodes);
470  unset($this->open_nodes[$k]);
471  }
472  $this->store->set("on_" . $this->id, serialize($this->open_nodes));
473  exit;
474  }
getNodeIdForDomNodeId(string $a_dom_node_id)
Get node id for dom node id.
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ createHTMLExportDirs()

static ilExplorerBaseGUI::createHTMLExportDirs ( string  $a_target_dir)
static

Definition at line 139 of file class.ilExplorerBaseGUI.php.

References getChildsOfNode(), getNodeContent(), getNodeId(), getRootNode(), and ilFileUtils\makeDirParents().

139  : void
140  {
141  ilFileUtils::makeDirParents($a_target_dir . "/components/ILIAS/UIComponent/Explorer2/lib/jstree-v.pre1.0");
142  ilFileUtils::makeDirParents($a_target_dir . "/components/ILIAS/UIComponent/Explorer2/js");
143  }
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
+ Here is the call graph for this function:

◆ getAjax()

ilExplorerBaseGUI::getAjax ( )

Definition at line 338 of file class.ilExplorerBaseGUI.php.

References $ajax.

Referenced by getOnLoadCode(), listItemStart(), and renderNode().

338  : bool
339  {
340  return $this->ajax;
341  }
+ Here is the caller graph for this function:

◆ getChildLimit()

ilExplorerBaseGUI::getChildLimit ( )

Definition at line 104 of file class.ilExplorerBaseGUI.php.

References $child_limit.

Referenced by renderChilds().

104  : int
105  {
106  return $this->child_limit;
107  }
+ Here is the caller graph for this function:

◆ getChildsOfNode()

ilExplorerBaseGUI::getChildsOfNode (   $a_parent_node_id)
abstract

Get children of node.

Parameters
string$a_parent_node_id
Returns
array

Referenced by createHTMLExportDirs(), getHTML(), nodeHasVisibleChilds(), and renderChilds().

+ Here is the caller graph for this function:

◆ getContainerId()

ilExplorerBaseGUI::getContainerId ( )

Definition at line 444 of file class.ilExplorerBaseGUI.php.

References getId().

Referenced by getHTML(), getNodeToggleOnClick(), getOnLoadCode(), and handleCommand().

444  : string
445  {
446  return "il_expl2_jstree_cont_" . $this->getId();
447  }
getId()
Get id of explorer element.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDomNodeIdForNodeId()

ilExplorerBaseGUI::getDomNodeIdForNodeId (   $a_node_id)

Get DOM node id for node id.

Parameters
string$a_node_id

Definition at line 825 of file class.ilExplorerBaseGUI.php.

References getId().

Referenced by getNodeToggleOnClick(), getOnLoadCode(), getSelectOnClick(), isNodeRequested(), and listItemStart().

825  : string
826  {
827  return "exp_node_" . $this->getId() . "_" . $a_node_id;
828  }
getId()
Get id of explorer element.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHTML()

ilExplorerBaseGUI::getHTML ( )

Definition at line 613 of file class.ilExplorerBaseGUI.php.

References $ctrl, $tpl, ILIAS\UICore\GlobalTemplate\addOnLoadCode(), beforeRendering(), getChildsOfNode(), getContainerId(), getId(), getNodeId(), getOnLoadCode(), getRootNode(), getSkipRootNode(), init(), isNodeVisible(), listEnd(), listStart(), renderNode(), and sortChilds().

613  : string
614  {
615  $tpl = $this->tpl;
616  $ilCtrl = $this->ctrl;
617 
618  $root = $this->getNodeId($this->getRootNode());
619  if (!in_array($root, $this->open_nodes)) {
620  $this->open_nodes[] = $root;
621  }
622 
623  $this->beforeRendering();
624 
625  self::init($tpl);
626  $container_id = $this->getContainerId();
627  $container_outer_id = "il_expl2_jstree_cont_out_" . $this->getId();
628 
629  if (!$ilCtrl->isAsynch()) {
630  $tpl->addOnLoadCode($this->getOnLoadCode());
631  }
632 
633  $etpl = new ilTemplate("tpl.explorer2.html", true, true, "components/ILIAS/UIComponent/Explorer2");
634 
635  if (!$this->ajax) {
636  // render childs
637  $root_node = $this->getRootNode();
638 
639  if (!$this->getSkipRootNode() &&
640  $this->isNodeVisible($this->getRootNode())) {
641  $this->listStart($etpl);
642  $this->renderNode($this->getRootNode(), $etpl);
643  $this->listEnd($etpl);
644  } else {
645  $childs = $this->getChildsOfNode($this->getNodeId($root_node));
646  $childs = $this->sortChilds($childs, $this->getNodeId($root_node));
647  $any = false;
648  foreach ($childs as $child_node) {
649  if ($this->isNodeVisible($child_node)) {
650  if (!$any) {
651  $this->listStart($etpl);
652  $any = true;
653  }
654  $this->renderNode($child_node, $etpl);
655  }
656  }
657  if ($any) {
658  $this->listEnd($etpl);
659  }
660  }
661  }
662 
663  $etpl->setVariable("CONTAINER_ID", $container_id);
664  $etpl->setVariable("CONTAINER_OUTER_ID", $container_outer_id);
665 
666  $add = "";
667  if ($ilCtrl->isAsynch()) {
668  $add = "<script>" . $this->getOnLoadCode() . "</script>";
669  }
670 
671  $content = $etpl->get();
672  //echo $content.$add; exit;
673  return $content . $add;
674  }
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
sortChilds(array $a_childs, $a_parent_node_id)
Sort childs.
isNodeVisible($a_node)
Is node visible?
ilGlobalTemplateInterface $tpl
getOnLoadCode()
Get on load code.
getRootNode()
Get root node.
getNodeId($a_node)
Get id of a node.
beforeRendering()
Before rendering.
renderNode($a_node, ilTemplate $tpl)
Render node.
getChildsOfNode($a_parent_node_id)
Get children of node.
getId()
Get id of explorer element.
+ Here is the call graph for this function:

◆ getId()

ilExplorerBaseGUI::getId ( )

Get id of explorer element.

Returns
string id

Definition at line 318 of file class.ilExplorerBaseGUI.php.

References $id.

Referenced by getContainerId(), getDomNodeIdForNodeId(), getHTML(), getNodeIdForDomNodeId(), and getOnLoadCode().

318  : string
319  {
320  return $this->id;
321  }
+ Here is the caller graph for this function:

◆ getJSTreePlugins()

ilExplorerBaseGUI::getJSTreePlugins ( )
protected

Definition at line 587 of file class.ilExplorerBaseGUI.php.

References isEnableDnd().

Referenced by getOnLoadCode().

587  : array
588  {
589  $plugins = array("html_data", "themes", "json_data");
590  if ($this->isEnableDnd()) {
591  $plugins[] = "dnd";
592  }
593  return $plugins;
594  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLocalExplorerJsPath()

static ilExplorerBaseGUI::getLocalExplorerJsPath ( )
static

Definition at line 124 of file class.ilExplorerBaseGUI.php.

Referenced by ilGroupUserActionProvider\getJsScripts(), and ILIAS\LearningModule\Export\LMHtmlExport\getSupplyingExportFiles().

124  : string
125  {
126  return self::$js_expl_path;
127  }
+ Here is the caller graph for this function:

◆ getLocalJsTreeCssPath()

static ilExplorerBaseGUI::getLocalJsTreeCssPath ( )
static

Definition at line 134 of file class.ilExplorerBaseGUI.php.

Referenced by ILIAS\LearningModule\Export\LMHtmlExport\getSupplyingExportFiles().

134  : string
135  {
136  return self::$js_tree_path_css;
137  }
+ Here is the caller graph for this function:

◆ getLocalJsTreeJsPath()

static ilExplorerBaseGUI::getLocalJsTreeJsPath ( )
static

Definition at line 129 of file class.ilExplorerBaseGUI.php.

Referenced by ilGroupUserActionProvider\getJsScripts(), and ILIAS\LearningModule\Export\LMHtmlExport\getSupplyingExportFiles().

129  : string
130  {
131  return self::$js_tree_path;
132  }
+ Here is the caller graph for this function:

◆ getNodeAsync()

ilExplorerBaseGUI::getNodeAsync ( )

Get node asynchronously.

Definition at line 479 of file class.ilExplorerBaseGUI.php.

References beforeRendering(), exit, getNodeId(), getNodeIdForDomNodeId(), getRootNode(), renderChilds(), renderNode(), setSearchTerm(), and ilUtil\stripSlashes().

479  : string
480  {
481  $this->beforeRendering();
482 
483  $etpl = new ilTemplate("tpl.explorer2.html", true, true, "components/ILIAS/UIComponent/Explorer2");
484 
485  $root = $this->getNodeId($this->getRootNode());
486  if (!in_array($root, $this->open_nodes)) {
487  $this->open_nodes[] = $root;
488  }
489  $this->setSearchTerm(ilUtil::stripSlashes($this->requested_searchterm));
490  if ($this->requested_node_id !== "") {
491  $id = $this->getNodeIdForDomNodeId($this->requested_node_id);
492  $this->renderChilds($id, $etpl);
493  } else {
494  $this->getNodeId($this->getRootNode());
495  $this->renderNode($this->getRootNode(), $etpl);
496  }
497  echo $etpl->get("tag");
498  exit;
499  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
renderChilds($a_node_id, ilTemplate $tpl)
Render childs.
getRootNode()
Get root node.
getNodeId($a_node)
Get id of a node.
getNodeIdForDomNodeId(string $a_dom_node_id)
Get node id for dom node id.
beforeRendering()
Before rendering.
renderNode($a_node, ilTemplate $tpl)
Render node.
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getNodeContent()

ilExplorerBaseGUI::getNodeContent (   $a_node)
abstract

Get content of a node.

Parameters
object | array$a_nodenode array or object
Returns
string content of the node

Referenced by createHTMLExportDirs(), ilTreeExplorerGUI\createNode(), ilTreeExplorerGUI\getTreeComponent(), ilTreeExplorerGUI\matches(), and renderNode().

+ Here is the caller graph for this function:

◆ getNodeHref()

ilExplorerBaseGUI::getNodeHref (   $a_node)

Get href for node.

Parameters
object | array$a_node
Returns
string href attribute

Definition at line 191 of file class.ilExplorerBaseGUI.php.

Referenced by ilTreeExplorerGUI\build(), and renderNode().

191  : string
192  {
193  return "#";
194  }
+ Here is the caller graph for this function:

◆ getNodeIcon()

ilExplorerBaseGUI::getNodeIcon (   $a_node)

Get node icon path.

Parameters
object | array$a_node
Returns
string image file path

Definition at line 231 of file class.ilExplorerBaseGUI.php.

Referenced by ilTreeExplorerGUI\createNode(), and renderNode().

231  : string
232  {
233  return "";
234  }
+ Here is the caller graph for this function:

◆ getNodeIconAlt()

ilExplorerBaseGUI::getNodeIconAlt (   $a_node)

Get node icon alt attribute.

Parameters
object | array$a_node
Returns
string image alt attribute

Definition at line 241 of file class.ilExplorerBaseGUI.php.

Referenced by renderNode().

241  : string
242  {
243  return "";
244  }
+ Here is the caller graph for this function:

◆ getNodeId()

ilExplorerBaseGUI::getNodeId (   $a_node)
abstract

Get id of a node.

Parameters
object | array$a_nodenode array or object
Returns
string id of node

Referenced by createHTMLExportDirs(), getHTML(), getNodeAsync(), getNodeToggleOnClick(), getOnLoadCode(), getSelectOnClick(), isNodeOpen(), isNodeRequested(), listItemStart(), nodeHasVisibleChilds(), and renderNode().

+ Here is the caller graph for this function:

◆ getNodeIdForDomNodeId()

ilExplorerBaseGUI::getNodeIdForDomNodeId ( string  $a_dom_node_id)

Get node id for dom node id.

Definition at line 833 of file class.ilExplorerBaseGUI.php.

References getId().

Referenced by closeNode(), getNodeAsync(), and openNode().

833  : string
834  {
835  $i = strlen("exp_node_" . $this->getId() . "_");
836  return substr($a_dom_node_id, $i);
837  }
getId()
Get id of explorer element.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNodeOnClick()

ilExplorerBaseGUI::getNodeOnClick (   $a_node)

Get node onclick attribute.

Parameters
object | array$a_nodenode
Returns
string onclick value

Definition at line 261 of file class.ilExplorerBaseGUI.php.

References getSelectOnClick().

Referenced by renderNode().

261  : string
262  {
263  if ($this->select_postvar !== "") {
264  return $this->getSelectOnClick($a_node);
265  }
266  return "";
267  }
getSelectOnClick($a_node)
Get onclick attribute for selecting radio/checkbox.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNodeTarget()

ilExplorerBaseGUI::getNodeTarget (   $a_node)

Get node target (frame) attribute.

Parameters
object | array$a_nodenode
Returns
string target

Definition at line 251 of file class.ilExplorerBaseGUI.php.

Referenced by renderNode().

251  : string
252  {
253  return "";
254  }
+ Here is the caller graph for this function:

◆ getNodeToggleOnClick()

ilExplorerBaseGUI::getNodeToggleOnClick (   $a_node)
finalprotected

Get onclick attribute for node toggling.

Parameters
object | array$a_node

Definition at line 374 of file class.ilExplorerBaseGUI.php.

References getContainerId(), getDomNodeIdForNodeId(), and getNodeId().

374  : string
375  {
376  return "$('#" . $this->getContainerId() . "').jstree('toggle_node' , '#" .
377  $this->getDomNodeIdForNodeId($this->getNodeId($a_node)) . "'); return false;";
378  }
getNodeId($a_node)
Get id of a node.
getDomNodeIdForNodeId($a_node_id)
Get DOM node id for node id.
+ Here is the call graph for this function:

◆ getOfflineMode()

ilExplorerBaseGUI::getOfflineMode ( )

◆ getOnLoadCode()

ilExplorerBaseGUI::getOnLoadCode ( )

Get on load code.

Definition at line 523 of file class.ilExplorerBaseGUI.php.

References $ctrl, $url, getAjax(), getContainerId(), getDomNodeIdForNodeId(), getId(), getJSTreePlugins(), getNodeId(), getOfflineMode(), and getRootNode().

Referenced by getHTML().

523  : string
524  {
525  $ilCtrl = $this->ctrl;
526 
527  $container_id = $this->getContainerId();
528  $container_outer_id = "il_expl2_jstree_cont_out_" . $this->getId();
529 
530  // collect open nodes
531  $open_nodes = array($this->getDomNodeIdForNodeId($this->getNodeId($this->getRootNode())));
532  foreach ($this->open_nodes as $nid) {
533  $open_nodes[] = $this->getDomNodeIdForNodeId($nid);
534  }
535  foreach ($this->custom_open_nodes as $nid) {
536  $dnode = $this->getDomNodeIdForNodeId($nid);
537  if (!in_array($dnode, $open_nodes)) {
538  $open_nodes[] = $dnode;
539  }
540  }
541  // ilias config options
542  $url = "";
543  if (!$this->getOfflineMode()) {
544  if (is_object($this->parent_obj)) {
545  $url = $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd, "", true);
546  } else {
547  if (!is_null($this->parent_obj)) {
548  $url = $ilCtrl->getLinkTargetByClass($this->parent_obj, $this->parent_cmd, "", true);
549  }
550  }
551  }
552 
553  // secondary highlighted nodes
554  $shn = array();
555  foreach ($this->sec_highl_nodes as $sh) {
556  $shn[] = $this->getDomNodeIdForNodeId($sh);
557  }
558  $config = array(
559  "container_id" => $container_id,
560  "container_outer_id" => $container_outer_id,
561  "url" => $url,
562  "second_hnodes" => $shn,
563  "ajax" => $this->getAjax(),
564  "node_par_name" => $this->node_parameter_name
565  );
566 
567 
568  // jstree config options
569  $js_tree_config = array(
570  "core" => array(
571  "animation" => 0,
572  "initially_open" => $open_nodes,
573  "open_parents" => false,
574  "strings" => array("loading" => "Loading ...", "new_node" => "New node"),
575  "themes" => array("dots" => false, "icons" => false, "theme" => "")
576  ),
577  "plugins" => $this->getJSTreePlugins(),
578  "html_data" => array()
579  );
580  return (
581  'il.Explorer2.init(' .
582  json_encode($config, JSON_THROW_ON_ERROR) . ', ' .
583  json_encode($js_tree_config, JSON_THROW_ON_ERROR) . ');'
584  );
585  }
$url
Definition: shib_logout.php:66
getRootNode()
Get root node.
getNodeId($a_node)
Get id of a node.
getDomNodeIdForNodeId($a_node_id)
Get DOM node id for node id.
getId()
Get id of explorer element.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRootNode()

ilExplorerBaseGUI::getRootNode ( )
abstract

Get root node.

Please note that the class does not make any requirements how nodes are represented (array or object)

Returns
object|array|null

Referenced by createHTMLExportDirs(), getHTML(), getNodeAsync(), getOnLoadCode(), isNodeOpen(), isNodeRequested(), and renderNode().

+ Here is the caller graph for this function:

◆ getSearchTerm()

ilExplorerBaseGUI::getSearchTerm ( )

Definition at line 114 of file class.ilExplorerBaseGUI.php.

References $search_term.

Referenced by ilTreeExplorerGUI\getChildsOfNode(), ilTreeExplorerGUI\matches(), and renderChilds().

114  : string
115  {
116  return $this->search_term;
117  }
+ Here is the caller graph for this function:

◆ getSecondaryHighlightedNodes()

ilExplorerBaseGUI::getSecondaryHighlightedNodes ( )

Get secondary (background) highlighted nodes.

Definition at line 354 of file class.ilExplorerBaseGUI.php.

References $sec_highl_nodes.

354  : array
355  {
356  return $this->sec_highl_nodes;
357  }

◆ getSelectOnClick()

ilExplorerBaseGUI::getSelectOnClick (   $a_node)
finalprotected

Get onclick attribute for selecting radio/checkbox.

Parameters
object | array$a_node

Definition at line 384 of file class.ilExplorerBaseGUI.php.

References getDomNodeIdForNodeId(), and getNodeId().

Referenced by getNodeOnClick().

384  : string
385  {
386  $dn_id = $this->getDomNodeIdForNodeId($this->getNodeId($a_node));
387  $oc = "il.Explorer2.selectOnClick(event, '" . $dn_id . "'); return false;";
388  return $oc;
389  }
getNodeId($a_node)
Get id of a node.
getDomNodeIdForNodeId($a_node_id)
Get DOM node id for node id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSkipRootNode()

ilExplorerBaseGUI::getSkipRootNode ( )

Definition at line 328 of file class.ilExplorerBaseGUI.php.

References $skip_root_node.

Referenced by getHTML(), ilTreeExplorerGUI\getTreeComponent(), and renderNode().

328  : bool
329  {
330  return $this->skip_root_node;
331  }
+ Here is the caller graph for this function:

◆ handleCommand()

ilExplorerBaseGUI::handleCommand ( )

Handle explorer internal command.

Definition at line 430 of file class.ilExplorerBaseGUI.php.

References $requested_exp_cmd, and getContainerId().

Referenced by ilObjTaxonomyGUI\showTree().

430  : bool
431  {
432  if ($this->requested_exp_cmd !== "" &&
433  $this->requested_exp_cont === $this->getContainerId()) {
435  if (in_array($cmd, array("openNode", "closeNode", "getNodeAsync"))) {
436  $this->$cmd();
437  }
438 
439  return true;
440  }
441  return false;
442  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

static ilExplorerBaseGUI::init ( ?ilGlobalTemplateInterface  $a_main_tpl = null)
static

Definition at line 598 of file class.ilExplorerBaseGUI.php.

References $DIC, ILIAS\UICore\GlobalTemplate\addCss(), ILIAS\UICore\GlobalTemplate\addJavaScript(), ilYuiUtil\initConnection(), and iljQueryUtil\initjQuery().

Referenced by ilInternalLinkGUI\getInitHTML(), ILIAS\Repository\Provider\RepositoryMainBarProvider\getStaticSubItems(), and ilObjStudyProgrammeGUI\initTreeJS().

598  : void
599  {
600  global $DIC;
601 
602  $tpl = $a_main_tpl ?? $DIC["tpl"];
603 
606 
607  $tpl->addJavaScript(self::getLocalExplorerJsPath());
608  $tpl->addJavaScript(self::getLocalJsTreeJsPath());
609  $tpl->addCss(self::getLocalJsTreeCssPath());
610  }
ilGlobalTemplateInterface $tpl
static initjQuery(?ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
global $DIC
Definition: shib_login.php:22
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
static initConnection(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isEnableDnd()

ilExplorerBaseGUI::isEnableDnd ( )

Definition at line 889 of file class.ilExplorerBaseGUI.php.

References $enable_dnd.

Referenced by getJSTreePlugins().

889  : bool
890  {
891  return $this->enable_dnd;
892  }
+ Here is the caller graph for this function:

◆ isNodeClickable()

ilExplorerBaseGUI::isNodeClickable (   $a_node)

Is node clickable?

Parameters
object | array$a_nodenode
Returns
bool node clickable true/false

Definition at line 294 of file class.ilExplorerBaseGUI.php.

Referenced by ilTreeExplorerGUI\build(), and renderNode().

294  : bool
295  {
296  return true;
297  }
+ Here is the caller graph for this function:

◆ isNodeHighlighted()

ilExplorerBaseGUI::isNodeHighlighted (   $a_node)

Is node highlighted?

Parameters
object | array$a_nodenode
Returns
bool node highlighted true/false

Definition at line 284 of file class.ilExplorerBaseGUI.php.

Referenced by renderNode().

284  : bool
285  {
286  return false;
287  }
+ Here is the caller graph for this function:

◆ isNodeOnclickEnabled()

ilExplorerBaseGUI::isNodeOnclickEnabled ( )

Definition at line 879 of file class.ilExplorerBaseGUI.php.

References $nodeOnclickEnabled.

Referenced by renderNode().

879  : bool
880  {
882  }
+ Here is the caller graph for this function:

◆ isNodeOpen()

ilExplorerBaseGUI::isNodeOpen (   $node_id)
protected

Get all open nodes.

Parameters
string$node_id

Definition at line 512 of file class.ilExplorerBaseGUI.php.

References getNodeId(), and getRootNode().

Referenced by ilTreeExplorerGUI\build(), and listItemStart().

512  : bool
513  {
514  return ($this->getNodeId($this->getRootNode()) == $node_id
515  || in_array($node_id, $this->open_nodes)
516  || in_array($node_id, $this->custom_open_nodes));
517  }
getRootNode()
Get root node.
getNodeId($a_node)
Get id of a node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isNodeRequested()

ilExplorerBaseGUI::isNodeRequested ( string  $a_node_id)
protected

Definition at line 815 of file class.ilExplorerBaseGUI.php.

References getDomNodeIdForNodeId(), getNodeId(), and getRootNode().

Referenced by ilTreeExplorerGUI\getChildsOfNode(), and renderChilds().

815  : bool
816  {
817  return ($this->requested_node_id === $this->getDomNodeIdForNodeId($a_node_id) ||
818  ($this->requested_node_id === "" && $a_node_id == $this->getNodeId($this->getRootNode())));
819  }
getRootNode()
Get root node.
getNodeId($a_node)
Get id of a node.
getDomNodeIdForNodeId($a_node_id)
Get DOM node id for node id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isNodeSelectable()

ilExplorerBaseGUI::isNodeSelectable (   $a_node)
protected

Is node selectable?

Parameters
object | array$a_nodenode
Returns
bool node selectable true/false

Definition at line 304 of file class.ilExplorerBaseGUI.php.

Referenced by renderNode().

304  : bool
305  {
306  return true;
307  }
+ Here is the caller graph for this function:

◆ isNodeVisible()

ilExplorerBaseGUI::isNodeVisible (   $a_node)

Is node visible?

Parameters
object | array$a_nodenode
Returns
bool node visible true/false

Definition at line 274 of file class.ilExplorerBaseGUI.php.

Referenced by ilTreeExplorerGUI\getChildsOfNode(), getHTML(), nodeHasVisibleChilds(), and renderChilds().

274  : bool
275  {
276  return true;
277  }
+ Here is the caller graph for this function:

◆ listEnd()

ilExplorerBaseGUI::listEnd ( ilTemplate  $tpl)

Definition at line 873 of file class.ilExplorerBaseGUI.php.

References ilTemplate\touchBlock().

Referenced by getHTML(), and renderChilds().

873  : void
874  {
875  $tpl->touchBlock("list_end");
876  $tpl->touchBlock("tag");
877  }
touchBlock(string $block)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listItemEnd()

ilExplorerBaseGUI::listItemEnd ( ilTemplate  $tpl)

Definition at line 861 of file class.ilExplorerBaseGUI.php.

References ilTemplate\touchBlock().

Referenced by renderNode().

861  : void
862  {
863  $tpl->touchBlock("list_item_end");
864  $tpl->touchBlock("tag");
865  }
touchBlock(string $block)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listItemStart()

ilExplorerBaseGUI::listItemStart ( ilTemplate  $tpl,
  $a_node 
)

List item start.

Parameters
object | array$a_node

Definition at line 843 of file class.ilExplorerBaseGUI.php.

References getAjax(), getDomNodeIdForNodeId(), getNodeId(), isNodeOpen(), nodeHasVisibleChilds(), ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilTemplate\touchBlock().

Referenced by renderNode().

843  : void
844  {
845  $tpl->setCurrentBlock("list_item_start");
846  if ($this->getAjax() && $this->nodeHasVisibleChilds($a_node) && !$this->isNodeOpen($this->getNodeId($a_node))) {
847  $tpl->touchBlock("li_closed");
848  }
849  if ($this->isNodeOpen($this->getNodeId($a_node))) {
850  $tpl->touchBlock("li_opened");
851  }
852 
853  $tpl->setVariable(
854  "DOM_NODE_ID",
855  $this->getDomNodeIdForNodeId($this->getNodeId($a_node))
856  );
857  $tpl->parseCurrentBlock();
858  $tpl->touchBlock("tag");
859  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
touchBlock(string $block)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
getNodeId($a_node)
Get id of a node.
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
isNodeOpen($node_id)
Get all open nodes.
getDomNodeIdForNodeId($a_node_id)
Get DOM node id for node id.
nodeHasVisibleChilds($a_node)
Node has children Please note that this standard method may not be optimal depending on what a derive...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listStart()

ilExplorerBaseGUI::listStart ( ilTemplate  $tpl)

Definition at line 867 of file class.ilExplorerBaseGUI.php.

References ilTemplate\touchBlock().

Referenced by getHTML(), and renderChilds().

867  : void
868  {
869  $tpl->touchBlock("list_start");
870  $tpl->touchBlock("tag");
871  }
touchBlock(string $block)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nodeHasVisibleChilds()

ilExplorerBaseGUI::nodeHasVisibleChilds (   $a_node)

Node has children Please note that this standard method may not be optimal depending on what a derived class does in isNodeVisible.

Parameters
object | array$a_node
Returns
bool

Definition at line 203 of file class.ilExplorerBaseGUI.php.

References getChildsOfNode(), getNodeId(), and isNodeVisible().

Referenced by listItemStart().

203  : bool
204  {
205  $childs = $this->getChildsOfNode($this->getNodeId($a_node));
206 
207  foreach ($childs as $child) {
208  if ($this->isNodeVisible($child)) {
209  return true;
210  }
211  }
212  return false;
213  }
isNodeVisible($a_node)
Is node visible?
getNodeId($a_node)
Get id of a node.
getChildsOfNode($a_parent_node_id)
Get children of node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openNode()

ilExplorerBaseGUI::openNode ( )

Open node.

Definition at line 452 of file class.ilExplorerBaseGUI.php.

References $id, exit, and getNodeIdForDomNodeId().

452  : void
453  {
454  $id = $this->getNodeIdForDomNodeId($this->requested_node_id);
455  if (!in_array($id, $this->open_nodes)) {
456  $this->open_nodes[] = $id;
457  }
458  $this->store->set("on_" . $this->id, serialize($this->open_nodes));
459  exit;
460  }
getNodeIdForDomNodeId(string $a_dom_node_id)
Get node id for dom node id.
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ renderChilds()

ilExplorerBaseGUI::renderChilds (   $a_node_id,
ilTemplate  $tpl 
)
final

Render childs.

Parameters
string$a_node_id

Definition at line 759 of file class.ilExplorerBaseGUI.php.

References getChildLimit(), getChildsOfNode(), getSearchTerm(), isNodeRequested(), isNodeVisible(), listEnd(), listStart(), ilTemplate\parseCurrentBlock(), renderNode(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), sortChilds(), and ilTemplate\touchBlock().

Referenced by getNodeAsync(), and renderNode().

759  : void
760  {
761  $childs = $this->getChildsOfNode($a_node_id);
762  $childs = $this->sortChilds($childs, $a_node_id);
763 
764  if (count($childs) > 0 || ($this->getSearchTerm() !== "" && $this->isNodeRequested($a_node_id))) {
765  // collect visible childs
766 
767  $visible_childs = [];
768  $cnt_child = 0;
769 
770  foreach ($childs as $child) {
771  $cnt_child++;
772  if ($this->getChildLimit() > 0 && $this->getChildLimit() < $cnt_child) {
773  continue;
774  }
775 
776  if ($this->isNodeVisible($child)) {
777  $visible_childs[] = $child;
778  }
779  }
780 
781  // search field, if too many childs
782  $any = false;
783  if (($this->getChildLimit() > 0 && $this->getChildLimit() < $cnt_child) || ($this->getSearchTerm() !== "" && $this->isNodeRequested($a_node_id))) {
784  $this->listStart($tpl);
785  $any = true;
786 
787  $tpl->setCurrentBlock("list_search");
788  $tpl->setVariable("SEARCH_CONTAINER_ID", $a_node_id);
789  if ($this->isNodeRequested($a_node_id)) {
790  $tpl->setVariable("SEARCH_VAL", $this->getSearchTerm());
791  }
792  $tpl->parseCurrentBlock();
793  $tpl->touchBlock("tag");
794  }
795 
796  // render visible childs
797  foreach ($visible_childs as $child) {
798  // check child limit
799  $cnt_child++;
800 
801  if ($this->isNodeVisible($child)) {
802  if (!$any) {
803  $this->listStart($tpl);
804  $any = true;
805  }
806  $this->renderNode($child, $tpl);
807  }
808  }
809  if ($any) {
810  $this->listEnd($tpl);
811  }
812  }
813  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
isNodeRequested(string $a_node_id)
sortChilds(array $a_childs, $a_parent_node_id)
Sort childs.
isNodeVisible($a_node)
Is node visible?
touchBlock(string $block)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
renderNode($a_node, ilTemplate $tpl)
Render node.
getChildsOfNode($a_parent_node_id)
Get children of node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderNode()

ilExplorerBaseGUI::renderNode (   $a_node,
ilTemplate  $tpl 
)

Render node.

Parameters
object | array$a_node

Definition at line 680 of file class.ilExplorerBaseGUI.php.

References getAjax(), getNodeContent(), getNodeHref(), getNodeIcon(), getNodeIconAlt(), getNodeId(), getNodeOnClick(), getNodeTarget(), getRootNode(), getSkipRootNode(), ilUtil\img(), isNodeClickable(), isNodeHighlighted(), isNodeOnclickEnabled(), isNodeSelectable(), listItemEnd(), listItemStart(), ilTemplate\parseCurrentBlock(), renderChilds(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilTemplate\touchBlock().

Referenced by getHTML(), getNodeAsync(), and renderChilds().

680  : void
681  {
682  $skip = ($this->getSkipRootNode()
683  && $this->getNodeId($this->getRootNode()) == $this->getNodeId($a_node));
684  if (!$skip) {
685  $this->listItemStart($tpl, $a_node);
686 
687  // select mode?
688  if ($this->select_postvar !== "" && $this->isNodeSelectable($a_node)) {
689  if ($this->select_multi) {
690  $tpl->setCurrentBlock("cb");
691  if (in_array($this->getNodeId($a_node), $this->selected_nodes)) {
692  $tpl->setVariable("CHECKED", 'checked="checked"');
693  }
694  $tpl->setVariable("CB_VAL", $this->getNodeId($a_node));
695  $tpl->setVariable("CB_NAME", $this->select_postvar . "[]");
696  } else {
697  $tpl->setCurrentBlock("rd");
698  if (in_array($this->getNodeId($a_node), $this->selected_nodes)) {
699  $tpl->setVariable("SELECTED", 'checked="checked"');
700  }
701  $tpl->setVariable("RD_VAL", $this->getNodeId($a_node));
702  $tpl->setVariable("RD_NAME", $this->select_postvar);
703  }
704  $tpl->parseCurrentBlock();
705  }
706 
707 
708  if ($this->isNodeHighlighted($a_node)) {
709  $tpl->touchBlock("hl");
710  }
711  $tpl->setCurrentBlock("content");
712  if ($this->getNodeIcon($a_node) !== "") {
713  $tpl->setVariable("ICON", ilUtil::img($this->getNodeIcon($a_node), $this->getNodeIconAlt($a_node)) . " ");
714  }
715  $tpl->setVariable("CONTENT", $this->getNodeContent($a_node));
716  if ($this->isNodeClickable($a_node)) {
717  $tpl->setVariable("HREF", $this->getNodeHref($a_node));
718  }
719  $target = $this->getNodeTarget($a_node);
720  if ($target !== "") {
721  $targetRelatedParams = array(
722  'target="' . $target . '"'
723  );
724 
725  if ('_blank' === $target) {
726  $targetRelatedParams[] = 'rel="noopener"';
727  }
728 
729  $tpl->setVariable('TARGET', implode(' ', $targetRelatedParams));
730  }
731  if (!$this->isNodeOnclickEnabled() || !$this->isNodeClickable($a_node)) {
732  $tpl->setVariable("ONCLICK", 'onclick="return false;"');
733  $tpl->setVariable("A_CLASS", 'class="disabled"');
734  } else {
735  $onclick = $this->getNodeOnClick($a_node);
736  if ($onclick !== "") {
737  $tpl->setVariable("ONCLICK", 'onclick="' . $onclick . '"');
738  }
739  }
740  $tpl->parseCurrentBlock();
741 
742  $tpl->touchBlock("tag");
743  }
744 
745  if (!$this->getAjax() || in_array($this->getNodeId($a_node), $this->open_nodes)
746  || in_array($this->getNodeId($a_node), $this->custom_open_nodes)) {
747  $this->renderChilds($this->getNodeId($a_node), $tpl);
748  }
749 
750  if (!$skip) {
751  $this->listItemEnd($tpl);
752  }
753  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
getNodeOnClick($a_node)
Get node onclick attribute.
isNodeClickable($a_node)
Is node clickable?
getNodeIcon($a_node)
Get node icon path.
getNodeIconAlt($a_node)
Get node icon alt attribute.
isNodeSelectable($a_node)
Is node selectable?
isNodeHighlighted($a_node)
Is node highlighted?
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
touchBlock(string $block)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
renderChilds($a_node_id, ilTemplate $tpl)
Render childs.
getRootNode()
Get root node.
listItemEnd(ilTemplate $tpl)
getNodeId($a_node)
Get id of a node.
listItemStart(ilTemplate $tpl, $a_node)
List item start.
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
getNodeContent($a_node)
Get content of a node.
getNodeTarget($a_node)
Get node target (frame) attribute.
getNodeHref($a_node)
Get href for node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAjax()

◆ setChildLimit()

ilExplorerBaseGUI::setChildLimit ( int  $a_val)

Definition at line 99 of file class.ilExplorerBaseGUI.php.

99  : void
100  {
101  $this->child_limit = $a_val;
102  }

◆ setEnableDnd()

ilExplorerBaseGUI::setEnableDnd ( bool  $enable_dnd)

Definition at line 895 of file class.ilExplorerBaseGUI.php.

References $enable_dnd.

895  : void
896  {
897  $this->enable_dnd = $enable_dnd;
898  }

◆ setMainTemplate()

ilExplorerBaseGUI::setMainTemplate ( ?ilGlobalTemplateInterface  $a_main_tpl = null)

Definition at line 119 of file class.ilExplorerBaseGUI.php.

119  : void
120  {
121  $this->tpl = $a_main_tpl;
122  }

◆ setNodeOnclickEnabled()

ilExplorerBaseGUI::setNodeOnclickEnabled ( bool  $nodeOnclickEnabled)

Definition at line 884 of file class.ilExplorerBaseGUI.php.

References $nodeOnclickEnabled.

Referenced by ilLSTOCGUI\__construct().

884  : void
885  {
886  $this->nodeOnclickEnabled = $nodeOnclickEnabled;
887  }
+ Here is the caller graph for this function:

◆ setNodeOpen()

ilExplorerBaseGUI::setNodeOpen (   $a_id)

Set node to be opened (additional custom opened node, not standard expand behaviour)

Parameters
string$a_id

Definition at line 363 of file class.ilExplorerBaseGUI.php.

Referenced by ilMediaPoolExplorerGUI\__construct(), ilForumExplorerGUI\__construct(), and ilTreeExplorerGUI\setPathOpen().

363  : void
364  {
365  if (!in_array($a_id, $this->custom_open_nodes)) {
366  $this->custom_open_nodes[] = $a_id;
367  }
368  }
+ Here is the caller graph for this function:

◆ setNodeSelected()

ilExplorerBaseGUI::setNodeSelected (   $a_id)

Set node to be opened (additional custom opened node, not standard expand behaviour)

Parameters
string$a_id

Definition at line 406 of file class.ilExplorerBaseGUI.php.

Referenced by ilSkillSelectorGUI\setSkillSelected().

406  : void
407  {
408  if (!in_array($a_id, $this->selected_nodes)) {
409  $this->selected_nodes[] = $a_id;
410  }
411  }
+ Here is the caller graph for this function:

◆ setOfflineMode()

ilExplorerBaseGUI::setOfflineMode ( bool  $a_val)

Definition at line 413 of file class.ilExplorerBaseGUI.php.

413  : void
414  {
415  $this->offline_mode = $a_val;
416  }

◆ setSearchTerm()

ilExplorerBaseGUI::setSearchTerm ( string  $a_val)

Definition at line 109 of file class.ilExplorerBaseGUI.php.

Referenced by getNodeAsync().

109  : void
110  {
111  $this->search_term = $a_val;
112  }
+ Here is the caller graph for this function:

◆ setSecondaryHighlightedNodes()

ilExplorerBaseGUI::setSecondaryHighlightedNodes ( array  $a_val)

Set secondary (background) highlighted nodes.

Definition at line 346 of file class.ilExplorerBaseGUI.php.

Referenced by ilLMTOCExplorerGUI\__construct().

346  : void
347  {
348  $this->sec_highl_nodes = $a_val;
349  }
+ Here is the caller graph for this function:

◆ setSelectMode()

ilExplorerBaseGUI::setSelectMode ( string  $a_postvar,
bool  $a_multi = false 
)

Set select mode (to deactivate, pass an empty string as postvar)

Parameters
string$a_postvarvariable used for post, a "[]" is added automatically
bool$a_multimulti select (checkboxes) or not (radio)

Definition at line 396 of file class.ilExplorerBaseGUI.php.

Referenced by ilForumMoveTopicsExplorer\__construct(), and ilTestQuestionPoolSelectorExplorer\__construct().

396  : void
397  {
398  $this->select_postvar = $a_postvar;
399  $this->select_multi = $a_multi;
400  }
+ Here is the caller graph for this function:

◆ setSkipRootNode()

◆ sortChilds()

ilExplorerBaseGUI::sortChilds ( array  $a_childs,
  $a_parent_node_id 
)

Sort childs.

Parameters
array$a_childsarray of child nodes
string$a_parent_node_idparent node
Returns
array array of childs nodes

Definition at line 221 of file class.ilExplorerBaseGUI.php.

Referenced by getHTML(), and renderChilds().

221  : array
222  {
223  return $a_childs;
224  }
+ Here is the caller graph for this function:

Field Documentation

◆ $ajax

bool ilExplorerBaseGUI::$ajax = false
protected

Definition at line 40 of file class.ilExplorerBaseGUI.php.

Referenced by getAjax().

◆ $child_limit

int ilExplorerBaseGUI::$child_limit = 0
protected

Definition at line 56 of file class.ilExplorerBaseGUI.php.

Referenced by getChildLimit().

◆ $ctrl

◆ $custom_open_nodes

array ilExplorerBaseGUI::$custom_open_nodes = array()
protected

Definition at line 41 of file class.ilExplorerBaseGUI.php.

◆ $enable_dnd

bool ilExplorerBaseGUI::$enable_dnd = false
protected

Definition at line 46 of file class.ilExplorerBaseGUI.php.

Referenced by isEnableDnd(), and setEnableDnd().

◆ $id

◆ $js_expl_path

string ilExplorerBaseGUI::$js_expl_path = "assets/js/Explorer2.js"
staticprotected

Definition at line 38 of file class.ilExplorerBaseGUI.php.

◆ $js_tree_path

string ilExplorerBaseGUI::$js_tree_path = "./node_modules/jstree/dist/jstree.js"
staticprotected

Definition at line 35 of file class.ilExplorerBaseGUI.php.

◆ $js_tree_path_css

string ilExplorerBaseGUI::$js_tree_path_css = "./node_modules/jstree/dist/themes/default/style.min.css"
staticprotected

Definition at line 36 of file class.ilExplorerBaseGUI.php.

◆ $log

ilLogger ilExplorerBaseGUI::$log
protected

Definition at line 31 of file class.ilExplorerBaseGUI.php.

◆ $node_parameter_name

string ilExplorerBaseGUI::$node_parameter_name
protected

◆ $nodeOnclickEnabled

bool ilExplorerBaseGUI::$nodeOnclickEnabled
private

Definition at line 57 of file class.ilExplorerBaseGUI.php.

Referenced by isNodeOnclickEnabled(), and setNodeOnclickEnabled().

◆ $offline_mode

bool ilExplorerBaseGUI::$offline_mode = false
protected

Definition at line 44 of file class.ilExplorerBaseGUI.php.

Referenced by getOfflineMode().

◆ $open_nodes

array ilExplorerBaseGUI::$open_nodes = []
protected

Definition at line 48 of file class.ilExplorerBaseGUI.php.

◆ $parent_cmd

string ilExplorerBaseGUI::$parent_cmd = ''
protected

Definition at line 58 of file class.ilExplorerBaseGUI.php.

◆ $parent_obj

◆ $requested_exp_cmd

string ilExplorerBaseGUI::$requested_exp_cmd = ""
protected

Definition at line 60 of file class.ilExplorerBaseGUI.php.

Referenced by handleCommand().

◆ $requested_exp_cont

string ilExplorerBaseGUI::$requested_exp_cont = ""
protected

Definition at line 61 of file class.ilExplorerBaseGUI.php.

◆ $requested_node_id

string ilExplorerBaseGUI::$requested_node_id = ""
protected

Definition at line 63 of file class.ilExplorerBaseGUI.php.

◆ $requested_searchterm

string ilExplorerBaseGUI::$requested_searchterm = ""
protected

Definition at line 62 of file class.ilExplorerBaseGUI.php.

◆ $search_term

string ilExplorerBaseGUI::$search_term = ""
protected

Definition at line 47 of file class.ilExplorerBaseGUI.php.

Referenced by getSearchTerm().

◆ $sec_highl_nodes

array ilExplorerBaseGUI::$sec_highl_nodes = array()
protected

Definition at line 45 of file class.ilExplorerBaseGUI.php.

Referenced by getSecondaryHighlightedNodes().

◆ $select_multi

bool ilExplorerBaseGUI::$select_multi = false
protected

Definition at line 50 of file class.ilExplorerBaseGUI.php.

◆ $select_postvar

string ilExplorerBaseGUI::$select_postvar = ""
protected

Definition at line 43 of file class.ilExplorerBaseGUI.php.

◆ $selected_nodes

array ilExplorerBaseGUI::$selected_nodes = array()
protected

Definition at line 42 of file class.ilExplorerBaseGUI.php.

Referenced by ilOrgUnitExplorerGUI\isNodeSelectable().

◆ $skip_root_node

bool ilExplorerBaseGUI::$skip_root_node = false
protected

Definition at line 39 of file class.ilExplorerBaseGUI.php.

Referenced by getSkipRootNode().

◆ $store

ilSessionIStorage ilExplorerBaseGUI::$store
protected

Definition at line 49 of file class.ilExplorerBaseGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilExplorerBaseGUI::$tpl
protected

Definition at line 33 of file class.ilExplorerBaseGUI.php.

Referenced by getHTML().


The documentation for this class was generated from the following file: