ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilExplorerBaseGUI Class Reference

Explorer base GUI class. More...

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

Public Member Functions

 __construct ($a_expl_id, $a_parent_obj, $a_parent_cmd)
 Constructor. More...
 
 setChildLimit ($a_val)
 Set child limit. More...
 
 getChildLimit ()
 Get child limit. More...
 
 setSearchTerm ($a_val)
 Set search term. More...
 
 getSearchTerm ()
 Get search term. More...
 
 setMainTemplate ($a_main_tpl=null)
 Set main template (that is responsible for adding js/css) More...
 
 getRootNode ()
 Get root node. More...
 
 getChildsOfNode ($a_parent_node_id)
 Get childs 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 childs? More...
 
 sortChilds ($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 ($a_val)
 Set skip root node. More...
 
 getSkipRootNode ()
 Get skip root node. More...
 
 setAjax ($a_val)
 Set ajax. More...
 
 getAjax ()
 Get ajax. More...
 
 setSecondaryHighlightedNodes ($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 ($a_postvar, $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 ($a_val)
 Set offline mode. More...
 
 getOfflineMode ()
 Get offline mode. More...
 
 handleCommand ()
 Handle explorer internal command. More...
 
 getContainerId ()
 Get container id. More...
 
 openNode ()
 Open node. More...
 
 closeNode ()
 Close node. More...
 
 getNodeAsync ()
 Get node asynchronously. More...
 
 beforeRendering ()
 Before rendering. More...
 
 getOnLoadCode ()
 Get on load code. More...
 
 getHTML ()
 Get HTML. More...
 
 renderNode ($a_node, $tpl)
 Render node. More...
 
 renderChilds ($a_node_id, $tpl)
 Render childs. More...
 
 getDomNodeIdForNodeId ($a_node_id)
 Get DOM node id for node id. More...
 
 getNodeIdForDomNodeId ($a_dom_node_id)
 Get node id for dom node id. More...
 
 listItemStart ($tpl, $a_node)
 List item start. More...
 
 listItemEnd ($tpl)
 List item end. More...
 
 listStart ($tpl)
 List start. More...
 
 listEnd ($tpl)
 List end. More...
 
 isNodeOnclickEnabled ()
 
 setNodeOnclickEnabled ($nodeOnclickEnabled)
 
 isEnableDnd ()
 
 setEnableDnd ($enable_dnd)
 Enable Drag & Drop functionality. More...
 

Static Public Member Functions

static getLocalExplorerJsPath ()
 Get local path of explorer js. More...
 
static getLocalJsTreeJsPath ()
 Get local path of jsTree js. More...
 
static getLocalJsTreeCssPath ()
 Get local path of jsTree js. More...
 
static createHTMLExportDirs ($a_target_dir)
 Create html export directories. More...
 
static init ($a_main_tpl=null)
 Init JS. More...
 

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 ()
 

Protected Attributes

 $log
 
 $ctrl
 
 $tpl
 
 $skip_root_node = false
 
 $ajax = false
 
 $custom_open_nodes = array()
 
 $selected_nodes = array()
 
 $select_postvar = ""
 
 $offline_mode = false
 
 $sec_highl_nodes = array()
 
 $enable_dnd = false
 
 $search_term = ""
 
 $open_nodes = []
 
 $store
 
 $parent_obj
 
 $child_limit = 0
 
 $parent_cmd = ''
 

Static Protected Attributes

static $js_tree_path = "./libs/bower/bower_components/jstree/dist/jstree.js"
 
static $js_tree_path_css = "./libs/bower/bower_components/jstree/dist/themes/default/style.min.css"
 
static $js_expl_path = "./Services/UIComponent/Explorer2/js/Explorer2.js"
 

Private Attributes

 $nodeOnclickEnabled
 

Detailed Description

Explorer base GUI class.

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
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilExplorerBaseGUI::__construct (   $a_expl_id,
  $a_parent_obj,
  $a_parent_cmd 
)

Constructor.

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

References $_GET, $DIC, $open_nodes, and ilYuiUtil\initConnection().

73  {
74  global $DIC;
75 
76  $this->log = $DIC["ilLog"];
77  $this->ctrl = $DIC->ctrl();
78  $this->tpl = $DIC["tpl"];
79  $this->id = $a_expl_id;
80  $this->parent_obj = $a_parent_obj;
81  $this->parent_cmd = $a_parent_cmd;
82  // get open nodes
83  include_once("./Services/Authentication/classes/class.ilSessionIStorage.php");
84  $this->store = new ilSessionIStorage("expl2");
85  $open_nodes = $this->store->get("on_" . $this->id);
86  $this->open_nodes = unserialize($open_nodes);
87  if (!is_array($this->open_nodes)) {
88  $this->open_nodes = array();
89  }
90 
91  $this->requested_node_id = $_GET["node_id"];
92 
93  $this->nodeOnclickEnabled = true;
95  }
$_GET["client_id"]
static initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
$DIC
Definition: xapitoken.php:46
Session based immediate storage.
+ Here is the call graph for this function:

Member Function Documentation

◆ beforeRendering()

ilExplorerBaseGUI::beforeRendering ( )

Before rendering.

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

Referenced by getHTML(), and getNodeAsync().

621  {
622  }
+ Here is the caller graph for this function:

◆ closeNode()

ilExplorerBaseGUI::closeNode ( )

Close node.

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

References $_GET, $ilLog, $log, exit, and getNodeIdForDomNodeId().

579  {
580  $ilLog = $this->log;
581 
582  $id = $this->getNodeIdForDomNodeId($_GET["node_id"]);
583  if (in_array($id, $this->open_nodes)) {
584  $k = array_search($id, $this->open_nodes);
585  unset($this->open_nodes[$k]);
586  }
587  $this->store->set("on_" . $this->id, serialize($this->open_nodes));
588  exit;
589  }
exit
Definition: login.php:29
$_GET["client_id"]
getNodeIdForDomNodeId($a_dom_node_id)
Get node id for dom node id.
+ Here is the call graph for this function:

◆ createHTMLExportDirs()

static ilExplorerBaseGUI::createHTMLExportDirs (   $a_target_dir)
static

Create html export directories.

Parameters
string$a_target_dirtarget directory

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

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

179  {
180  ilUtil::makeDirParents($a_target_dir . "/Services/UIComponent/Explorer2/lib/jstree-v.pre1.0");
181  ilUtil::makeDirParents($a_target_dir . "/Services/UIComponent/Explorer2/js");
182  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
+ Here is the call graph for this function:

◆ getAjax()

ilExplorerBaseGUI::getAjax ( )

Get ajax.

Returns
boolean ajax

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

References $ajax.

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

418  {
419  return $this->ajax;
420  }
+ Here is the caller graph for this function:

◆ getChildLimit()

ilExplorerBaseGUI::getChildLimit ( )

Get child limit.

Returns
int child limit

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

References $child_limit.

Referenced by renderChilds().

113  {
114  return $this->child_limit;
115  }
+ Here is the caller graph for this function:

◆ getChildsOfNode()

ilExplorerBaseGUI::getChildsOfNode (   $a_parent_node_id)
abstract

Get childs of node.

Parameters
string$a_parent_idparent node id
Returns
array childs

Referenced by createHTMLExportDirs(), getHTML(), ilKSDocumentationExplorerGUI\getRootNode(), nodeHasVisibleChilds(), and renderChilds().

+ Here is the caller graph for this function:

◆ getContainerId()

ilExplorerBaseGUI::getContainerId ( )

Get container id.

Parameters

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

References getId().

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

556  {
557  return "il_expl2_jstree_cont_" . $this->getId();
558  }
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

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

References getId().

Referenced by ilTreeExplorerGUI\getChildsOfNode(), getNodeToggleOnClick(), getOnLoadCode(), getSelectOnClick(), ilObjStudyProgrammeTreeExplorerGUI\listItemStart(), listItemStart(), and renderChilds().

954  {
955  return "exp_node_" . $this->getId() . "_" . $a_node_id;
956  }
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 ( )

Get HTML.

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

References $ctrl, $ilCtrl, $tpl, beforeRendering(), getChildsOfNode(), getContainerId(), getId(), getNodeId(), getOnLoadCode(), getRootNode(), getSkipRootNode(), isNodeVisible(), listEnd(), listStart(), renderNode(), and sortChilds().

739  {
740  $tpl = $this->tpl;
742 
743  $root = $this->getNodeId($this->getRootNode());
744  if (!in_array($root, $this->open_nodes)) {
745  $this->open_nodes[] = $root;
746  }
747 
748  $this->beforeRendering();
749 
750  self::init($tpl);
751  $container_id = $this->getContainerId();
752  $container_outer_id = "il_expl2_jstree_cont_out_" . $this->getId();
753 
754  if (!$ilCtrl->isAsynch()) {
755  $tpl->addOnLoadCode($this->getOnLoadCode());
756  }
757 
758  $etpl = new ilTemplate("tpl.explorer2.html", true, true, "Services/UIComponent/Explorer2");
759 
760  if (!$this->ajax) {
761  // render childs
762  $root_node = $this->getRootNode();
763 
764  if (!$this->getSkipRootNode() &&
765  $this->isNodeVisible($this->getRootNode())) {
766  $this->listStart($etpl);
767  $this->renderNode($this->getRootNode(), $etpl);
768  $this->listEnd($etpl);
769  } else {
770  $childs = $this->getChildsOfNode($this->getNodeId($root_node));
771  $childs = $this->sortChilds($childs, $this->getNodeId($root_node));
772  $any = false;
773  foreach ($childs as $child_node) {
774  if ($this->isNodeVisible($child_node)) {
775  if (!$any) {
776  $this->listStart($etpl);
777  $any = true;
778  }
779  $this->renderNode($child_node, $etpl);
780  }
781  }
782  if ($any) {
783  $this->listEnd($etpl);
784  }
785  }
786  }
787 
788  $etpl->setVariable("CONTAINER_ID", $container_id);
789  $etpl->setVariable("CONTAINER_OUTER_ID", $container_outer_id);
790 
791  $add = "";
792  if ($ilCtrl->isAsynch()) {
793  $add = "<script>" . $this->getOnLoadCode() . "</script>";
794  }
795 
796  $content = $etpl->get();
797  //echo $content.$add; exit;
798  return $content . $add;
799  }
renderNode($a_node, $tpl)
Render node.
isNodeVisible($a_node)
Is node visible?
sortChilds($a_childs, $a_parent_node_id)
Sort childs.
global $ilCtrl
Definition: ilias.php:18
getSkipRootNode()
Get skip root node.
getOnLoadCode()
Get on load code.
getRootNode()
Get root node.
getNodeId($a_node)
Get id of a node.
beforeRendering()
Before rendering.
getChildsOfNode($a_parent_node_id)
Get childs of node.
getId()
Get id of explorer element.
getContainerId()
Get container id.
+ Here is the call graph for this function:

◆ getId()

ilExplorerBaseGUI::getId ( )

Get id of explorer element.

Returns
integer id

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

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

376  {
377  return $this->id;
378  }
+ Here is the caller graph for this function:

◆ getJSTreePlugins()

ilExplorerBaseGUI::getJSTreePlugins ( )
protected

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

References isEnableDnd().

Referenced by getOnLoadCode().

704  {
705  $plugins = array("html_data", "themes", "json_data");
706  if ($this->isEnableDnd()) {
707  $plugins[] = "dnd";
708  }
709  return $plugins;
710  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLocalExplorerJsPath()

static ilExplorerBaseGUI::getLocalExplorerJsPath ( )
static

Get local path of explorer js.

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

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

153  {
154  return self::$js_expl_path;
155  }
+ Here is the caller graph for this function:

◆ getLocalJsTreeCssPath()

static ilExplorerBaseGUI::getLocalJsTreeCssPath ( )
static

Get local path of jsTree js.

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

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

169  {
170  return self::$js_tree_path_css;
171  }
+ Here is the caller graph for this function:

◆ getLocalJsTreeJsPath()

static ilExplorerBaseGUI::getLocalJsTreeJsPath ( )
static

Get local path of jsTree js.

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

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

161  {
162  return self::$js_tree_path;
163  }
+ Here is the caller graph for this function:

◆ getNodeAsync()

ilExplorerBaseGUI::getNodeAsync ( )

Get node asynchronously.

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

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

595  {
596  $this->beforeRendering();
597 
598  $etpl = new ilTemplate("tpl.explorer2.html", true, true, "Services/UIComponent/Explorer2");
599 
600  $root = $this->getNodeId($this->getRootNode());
601  if (!in_array($root, $this->open_nodes)) {
602  $this->open_nodes[] = $root;
603  }
604 
605  if ($_GET["node_id"] != "") {
606  $id = $this->getNodeIdForDomNodeId($_GET["node_id"]);
607  $this->setSearchTerm(ilUtil::stripSlashes($_GET["searchterm"]));
608  $this->renderChilds($id, $etpl);
609  } else {
610  $id = $this->getNodeId($this->getRootNode());
611  $this->renderNode($this->getRootNode(), $etpl);
612  }
613  echo $etpl->get("tag");
614  exit;
615  }
exit
Definition: login.php:29
$_GET["client_id"]
renderChilds($a_node_id, $tpl)
Render childs.
renderNode($a_node, $tpl)
Render node.
getRootNode()
Get root node.
getNodeId($a_node)
Get id of a node.
beforeRendering()
Before rendering.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setSearchTerm($a_val)
Set search term.
getNodeIdForDomNodeId($a_dom_node_id)
Get node id for dom node id.
+ Here is the call graph for this function:

◆ getNodeContent()

ilExplorerBaseGUI::getNodeContent (   $a_node)
abstract

Get content of a node.

Parameters
mixed$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
mixed$a_nodenode object/array
Returns
string href attribute

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

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

236  {
237  return "#";
238  }
+ Here is the caller graph for this function:

◆ getNodeIcon()

ilExplorerBaseGUI::getNodeIcon (   $a_node)

Get node icon path.

Parameters
mixed$a_nodenode object/array
Returns
string image file path

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

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

281  {
282  return "";
283  }
+ Here is the caller graph for this function:

◆ getNodeIconAlt()

ilExplorerBaseGUI::getNodeIconAlt (   $a_node)

Get node icon alt attribute.

Parameters
mixed$a_nodenode object/array
Returns
string image alt attribute

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

Referenced by renderNode().

292  {
293  return "";
294  }
+ Here is the caller graph for this function:

◆ getNodeId()

ilExplorerBaseGUI::getNodeId (   $a_node)
abstract

Get id of a node.

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

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

+ Here is the caller graph for this function:

◆ getNodeIdForDomNodeId()

ilExplorerBaseGUI::getNodeIdForDomNodeId (   $a_dom_node_id)

Get node id for dom node id.

Parameters

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

References $i, and getId().

Referenced by closeNode(), getNodeAsync(), ilObjStudyProgrammeTreeExplorerGUI\openCertainNode(), and openNode().

965  {
966  $i = strlen("exp_node_" . $this->getId() . "_");
967  return substr($a_dom_node_id, $i);
968  }
getId()
Get id of explorer element.
$i
Definition: metadata.php:24
+ 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
mixed$a_nodenode object/array
Returns
string onclick value

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

References getSelectOnClick().

Referenced by renderNode().

314  {
315  if ($this->select_postvar != "") {
316  return $this->getSelectOnClick($a_node);
317  }
318  return "";
319  }
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
mixed$a_nodenode object/array
Returns
string target

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

Referenced by renderNode().

303  {
304  return "";
305  }
+ Here is the caller graph for this function:

◆ getNodeToggleOnClick()

ilExplorerBaseGUI::getNodeToggleOnClick (   $a_node)
finalprotected

Get onclick attribute for node toggling.

Parameters

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

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

462  {
463  return "$('#" . $this->getContainerId() . "').jstree('toggle_node' , '#" .
464  $this->getDomNodeIdForNodeId($this->getNodeId($a_node)) . "'); return false;";
465  }
getNodeId($a_node)
Get id of a node.
getDomNodeIdForNodeId($a_node_id)
Get DOM node id for node id.
getContainerId()
Get container id.
+ Here is the call graph for this function:

◆ getOfflineMode()

ilExplorerBaseGUI::getOfflineMode ( )

◆ getOnLoadCode()

ilExplorerBaseGUI::getOnLoadCode ( )

Get on load code.

Parameters

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

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

Referenced by getHTML().

645  {
647 
648  $container_id = $this->getContainerId();
649  $container_outer_id = "il_expl2_jstree_cont_out_" . $this->getId();
650 
651  // collect open nodes
652  $open_nodes = array($this->getDomNodeIdForNodeId($this->getNodeId($this->getRootNode())));
653  foreach ($this->open_nodes as $nid) {
654  $open_nodes[] = $this->getDomNodeIdForNodeId($nid);
655  }
656  foreach ($this->custom_open_nodes as $nid) {
657  $dnode = $this->getDomNodeIdForNodeId($nid);
658  if (!in_array($dnode, $open_nodes)) {
659  $open_nodes[] = $dnode;
660  }
661  }
662 
663  // ilias config options
664  $url = "";
665  if (!$this->getOfflineMode()) {
666  if (is_object($this->parent_obj)) {
667  $url = $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd, "", true);
668  } else {
669  $url = $ilCtrl->getLinkTargetByClass($this->parent_obj, $this->parent_cmd, "", true);
670  }
671  }
672 
673  // secondary highlighted nodes
674  $shn = array();
675  foreach ($this->sec_highl_nodes as $sh) {
676  $shn[] = $this->getDomNodeIdForNodeId($sh);
677  }
678  $config = array(
679  "container_id" => $container_id,
680  "container_outer_id" => $container_outer_id,
681  "url" => $url,
682  "second_hnodes" => $shn,
683  "ajax" => $this->getAjax(),
684  );
685 
686 
687  // jstree config options
688  $js_tree_config = array(
689  "core" => array(
690  "animation" => 0,
691  "initially_open" => $open_nodes,
692  "open_parents" => false,
693  "strings" => array("loading" => "Loading ...", "new_node" => "New node"),
694  "themes" => array("dots" => false, "icons" => false, "theme" => "")
695  ),
696  "plugins" => $this->getJSTreePlugins(),
697  "html_data" => array()
698  );
699 
700  return 'il.Explorer2.init(' . json_encode($config) . ', ' . json_encode($js_tree_config) . ');';
701  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68
global $ilCtrl
Definition: ilias.php:18
getRootNode()
Get root node.
getNodeId($a_node)
Get id of a node.
getOfflineMode()
Get offline mode.
$url
getDomNodeIdForNodeId($a_node_id)
Get DOM node id for node id.
getId()
Get id of explorer element.
getContainerId()
Get container id.
+ 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
mixed root node object/array

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

+ Here is the caller graph for this function:

◆ getSearchTerm()

ilExplorerBaseGUI::getSearchTerm ( )

Get search term.

Returns
string search term

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

References $search_term.

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

133  {
134  return $this->search_term;
135  }
+ Here is the caller graph for this function:

◆ getSecondaryHighlightedNodes()

ilExplorerBaseGUI::getSecondaryHighlightedNodes ( )

Get secondary (background) highlighted nodes.

Returns
array array of node ids

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

References $sec_highl_nodes.

438  {
439  return $this->sec_highl_nodes;
440  }

◆ getSelectOnClick()

ilExplorerBaseGUI::getSelectOnClick (   $a_node)
finalprotected

Get onclick attribute for selecting radio/checkbox.

Parameters

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

References getDomNodeIdForNodeId(), and getNodeId().

Referenced by getNodeOnClick().

474  {
475  $dn_id = $this->getDomNodeIdForNodeId($this->getNodeId($a_node));
476  $oc = "il.Explorer2.selectOnClick(event, '" . $dn_id . "'); return false;";
477  return $oc;
478  }
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 ( )

Get skip root node.

Returns
boolean skip root node

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

References $skip_root_node.

Referenced by getHTML(), and renderNode().

398  {
399  return $this->skip_root_node;
400  }
+ Here is the caller graph for this function:

◆ handleCommand()

ilExplorerBaseGUI::handleCommand ( )

Handle explorer internal command.

Returns
boolean true, if an internal command has been performed.

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

References $_GET, and getContainerId().

Referenced by ilObjTaxonomyGUI\showTree().

536  {
537  if ($_GET["exp_cmd"] != "" &&
538  $_GET["exp_cont"] == $this->getContainerId()) {
539  $cmd = $_GET["exp_cmd"];
540  if (in_array($cmd, array("openNode", "closeNode", "getNodeAsync"))) {
541  $this->$cmd();
542  }
543 
544  return true;
545  }
546  return false;
547  }
$_GET["client_id"]
getContainerId()
Get container id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

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

Init JS.

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

References $DIC, $tpl, and iljQueryUtil\initjQuery().

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

717  {
718  global $DIC;
719 
720  if ($a_main_tpl == null) {
721  $tpl = $DIC["tpl"];
722  } else {
723  $tpl = $a_main_tpl;
724  }
725 
726  include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
728 
729  $tpl->addJavascript(self::getLocalExplorerJsPath());
730  $tpl->addJavascript(self::getLocalJsTreeJsPath());
731  $tpl->addCss(self::getLocalJsTreeCssPath());
732  }
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isEnableDnd()

ilExplorerBaseGUI::isEnableDnd ( )

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

References $enable_dnd.

Referenced by getJSTreePlugins().

1047  {
1048  return $this->enable_dnd;
1049  }
+ Here is the caller graph for this function:

◆ isNodeClickable()

ilExplorerBaseGUI::isNodeClickable (   $a_node)

Is node clickable?

Parameters
mixed$a_nodenode object/array
Returns
boolean node clickable true/false

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

Referenced by renderNode().

350  {
351  return true;
352  }
+ Here is the caller graph for this function:

◆ isNodeHighlighted()

ilExplorerBaseGUI::isNodeHighlighted (   $a_node)

Is node highlighted?

Parameters
mixed$a_nodenode object/array
Returns
boolean node highlighted true/false

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

Referenced by renderNode().

339  {
340  return false;
341  }
+ Here is the caller graph for this function:

◆ isNodeOnclickEnabled()

ilExplorerBaseGUI::isNodeOnclickEnabled ( )
Returns
boolean

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

References $nodeOnclickEnabled.

Referenced by renderNode().

1034  {
1036  }
+ Here is the caller graph for this function:

◆ isNodeOpen()

ilExplorerBaseGUI::isNodeOpen (   $node_id)
protected

Get all open nodes.

Parameters

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

References getNodeId(), and getRootNode().

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

631  {
632  return ($this->getNodeId($this->getRootNode()) == $node_id
633  || in_array($node_id, $this->open_nodes)
634  || in_array($node_id, $this->custom_open_nodes));
635  }
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:

◆ isNodeSelectable()

ilExplorerBaseGUI::isNodeSelectable (   $a_node)
protected

Is node selectable?

Parameters
mixed$a_nodenode object/array
Returns
boolean node selectable true/false

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

Referenced by renderNode().

361  {
362  return true;
363  }
+ Here is the caller graph for this function:

◆ isNodeVisible()

ilExplorerBaseGUI::isNodeVisible (   $a_node)

Is node visible?

Parameters
mixed$a_nodenode object/array
Returns
boolean node visible true/false

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

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

328  {
329  return true;
330  }
+ Here is the caller graph for this function:

◆ listEnd()

ilExplorerBaseGUI::listEnd (   $tpl)

List end.

Parameters

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

References $tpl.

Referenced by getHTML(), and renderChilds().

1025  {
1026  $tpl->touchBlock("list_end");
1027  $tpl->touchBlock("tag");
1028  }
+ Here is the caller graph for this function:

◆ listItemEnd()

ilExplorerBaseGUI::listItemEnd (   $tpl)

List item end.

Parameters

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

References $tpl.

Referenced by renderNode().

1001  {
1002  $tpl->touchBlock("list_item_end");
1003  $tpl->touchBlock("tag");
1004  }
+ Here is the caller graph for this function:

◆ listItemStart()

ilExplorerBaseGUI::listItemStart (   $tpl,
  $a_node 
)

List item start.

Parameters

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

References $tpl, getAjax(), getDomNodeIdForNodeId(), getNodeId(), isNodeOpen(), and nodeHasVisibleChilds().

Referenced by renderNode().

977  {
978  $tpl->setCurrentBlock("list_item_start");
979  if ($this->getAjax() && $this->nodeHasVisibleChilds($a_node) && !$this->isNodeOpen($this->getNodeId($a_node))) {
980  $tpl->touchBlock("li_closed");
981  }
982  if ($this->isNodeOpen($this->getNodeId($a_node))) {
983  $tpl->touchBlock("li_opened");
984  }
985 
986  $tpl->setVariable(
987  "DOM_NODE_ID",
988  $this->getDomNodeIdForNodeId($this->getNodeId($a_node))
989  );
990  $tpl->parseCurrentBlock();
991  $tpl->touchBlock("tag");
992  }
getNodeId($a_node)
Get id of a node.
isNodeOpen($node_id)
Get all open nodes.
getDomNodeIdForNodeId($a_node_id)
Get DOM node id for node id.
nodeHasVisibleChilds($a_node)
Node has childs?
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listStart()

ilExplorerBaseGUI::listStart (   $tpl)

List start.

Parameters

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

References $tpl.

Referenced by getHTML(), and renderChilds().

1013  {
1014  $tpl->touchBlock("list_start");
1015  $tpl->touchBlock("tag");
1016  }
+ Here is the caller graph for this function:

◆ nodeHasVisibleChilds()

ilExplorerBaseGUI::nodeHasVisibleChilds (   $a_node)

Node has childs?

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

Parameters

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

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

Referenced by ilObjStudyProgrammeTreeExplorerGUI\listItemStart(), and listItemStart().

250  {
251  $childs = $this->getChildsOfNode($this->getNodeId($a_node));
252 
253  foreach ($childs as $child) {
254  if ($this->isNodeVisible($child)) {
255  return true;
256  }
257  }
258  return false;
259  }
isNodeVisible($a_node)
Is node visible?
getNodeId($a_node)
Get id of a node.
getChildsOfNode($a_parent_node_id)
Get childs 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 563 of file class.ilExplorerBaseGUI.php.

References $_GET, $ilLog, $log, exit, and getNodeIdForDomNodeId().

564  {
565  $ilLog = $this->log;
566 
567  $id = $this->getNodeIdForDomNodeId($_GET["node_id"]);
568  if (!in_array($id, $this->open_nodes)) {
569  $this->open_nodes[] = $id;
570  }
571  $this->store->set("on_" . $this->id, serialize($this->open_nodes));
572  exit;
573  }
exit
Definition: login.php:29
$_GET["client_id"]
getNodeIdForDomNodeId($a_dom_node_id)
Get node id for dom node id.
+ Here is the call graph for this function:

◆ renderChilds()

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

Render childs.

Parameters

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

References $tpl, getChildLimit(), getChildsOfNode(), getDomNodeIdForNodeId(), getSearchTerm(), isNodeVisible(), listEnd(), listStart(), renderNode(), and sortChilds().

Referenced by getNodeAsync(), and renderNode().

890  {
891  $childs = $this->getChildsOfNode($a_node_id);
892  $childs = $this->sortChilds($childs, $a_node_id);
893 
894  if (count($childs) > 0 || ($this->getSearchTerm() != "" && $this->requested_node_id == $this->getDomNodeIdForNodeId($a_node_id))) {
895  // collect visible childs
896 
897  $visible_childs = [];
898  $cnt_child = 0;
899 
900  foreach ($childs as $child) {
901  $cnt_child++;
902  if ($this->getChildLimit() > 0 && $this->getChildLimit() < $cnt_child) {
903  continue;
904  }
905 
906  if ($this->isNodeVisible($child)) {
907  $visible_childs[] = $child;
908  }
909  }
910 
911  // search field, if too many childs
912  $any = false;
913  if ($this->getChildLimit() > 0 && $this->getChildLimit() < $cnt_child
914  || ($this->getSearchTerm() != "")) {
915  if (!$any) {
916  $this->listStart($tpl);
917  $any = true;
918  }
919  $tpl->setCurrentBlock("list_search");
920  $tpl->setVariable("SEARCH_CONTAINER_ID", $a_node_id);
921  if ($this->requested_node_id == $this->getDomNodeIdForNodeId($a_node_id)) {
922  $tpl->setVariable("SEARCH_VAL", $this->getSearchTerm());
923  }
924  $tpl->parseCurrentBlock();
925  $tpl->touchBlock("tag");
926  }
927 
928  // render visible childs
929  foreach ($visible_childs as $child) {
930  // check child limit
931  $cnt_child++;
932 
933  if ($this->isNodeVisible($child)) {
934  if (!$any) {
935  $this->listStart($tpl);
936  $any = true;
937  }
938  $this->renderNode($child, $tpl);
939  }
940  }
941  if ($any) {
942  $this->listEnd($tpl);
943  }
944  }
945  }
getSearchTerm()
Get search term.
getChildLimit()
Get child limit.
renderNode($a_node, $tpl)
Render node.
isNodeVisible($a_node)
Is node visible?
sortChilds($a_childs, $a_parent_node_id)
Sort childs.
getChildsOfNode($a_parent_node_id)
Get childs of 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:

◆ renderNode()

ilExplorerBaseGUI::renderNode (   $a_node,
  $tpl 
)

Render node.

Parameters

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

References $tpl, getAjax(), getNodeContent(), getNodeHref(), getNodeIcon(), getNodeIconAlt(), getNodeId(), getNodeOnClick(), getNodeTarget(), getRootNode(), getSkipRootNode(), ilUtil\img(), isNodeClickable(), isNodeHighlighted(), isNodeOnclickEnabled(), isNodeSelectable(), listItemEnd(), listItemStart(), and renderChilds().

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

808  {
809  $skip = ($this->getSkipRootNode()
810  && $this->getNodeId($this->getRootNode()) == $this->getNodeId($a_node));
811  if (!$skip) {
812  $this->listItemStart($tpl, $a_node);
813 
814  // select mode?
815  if ($this->select_postvar != "" && $this->isNodeSelectable($a_node)) {
816  if ($this->select_multi) {
817  $tpl->setCurrentBlock("cb");
818  if (in_array($this->getNodeId($a_node), $this->selected_nodes)) {
819  $tpl->setVariable("CHECKED", 'checked="checked"');
820  }
821  $tpl->setVariable("CB_VAL", $this->getNodeId($a_node));
822  $tpl->setVariable("CB_NAME", $this->select_postvar . "[]");
823  $tpl->parseCurrentBlock();
824  } else {
825  $tpl->setCurrentBlock("rd");
826  if (in_array($this->getNodeId($a_node), $this->selected_nodes)) {
827  $tpl->setVariable("SELECTED", 'checked="checked"');
828  }
829  $tpl->setVariable("RD_VAL", $this->getNodeId($a_node));
830  $tpl->setVariable("RD_NAME", $this->select_postvar);
831  $tpl->parseCurrentBlock();
832  }
833  }
834 
835 
836  if ($this->isNodeHighlighted($a_node)) {
837  $tpl->touchBlock("hl");
838  }
839  $tpl->setCurrentBlock("content");
840  if ($this->getNodeIcon($a_node) != "") {
841  $tpl->setVariable("ICON", ilUtil::img($this->getNodeIcon($a_node), $this->getNodeIconAlt($a_node)) . " ");
842  }
843  $tpl->setVariable("CONTENT", $this->getNodeContent($a_node));
844  if ($this->isNodeClickable($a_node)) {
845  $tpl->setVariable("HREF", $this->getNodeHref($a_node));
846  }
847  $target = $this->getNodeTarget($a_node);
848  if ($target != "") {
849  $targetRelatedParams = array(
850  'target="' . $target . '"'
851  );
852 
853  if ('_blank' === $target) {
854  $targetRelatedParams[] = 'rel="noopener"';
855  }
856 
857  $tpl->setVariable('TARGET', implode(' ', $targetRelatedParams));
858  }
859  if (!$this->isNodeOnclickEnabled() || !$this->isNodeClickable($a_node)) {
860  $tpl->setVariable("ONCLICK", 'onclick="return false;"');
861  $tpl->setVariable("A_CLASS", 'class="disabled"');
862  } else {
863  $onclick = $this->getNodeOnClick($a_node);
864  if ($onclick != "") {
865  $tpl->setVariable("ONCLICK", 'onclick="' . $onclick . '"');
866  }
867  }
868  $tpl->parseCurrentBlock();
869 
870  $tpl->touchBlock("tag");
871  }
872 
873  if (!$this->getAjax() || in_array($this->getNodeId($a_node), $this->open_nodes)
874  || in_array($this->getNodeId($a_node), $this->custom_open_nodes)) {
875  $this->renderChilds($this->getNodeId($a_node), $tpl);
876  }
877 
878  if (!$skip) {
879  $this->listItemEnd($tpl);
880  }
881  }
getNodeOnClick($a_node)
Get node onclick attribute.
isNodeClickable($a_node)
Is node clickable?
renderChilds($a_node_id, $tpl)
Render childs.
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?
getSkipRootNode()
Get skip root node.
getRootNode()
Get root node.
getNodeId($a_node)
Get id of a node.
static img($a_src, $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
getNodeContent($a_node)
Get content of a node.
getNodeTarget($a_node)
Get node target (frame) attribute.
listItemStart($tpl, $a_node)
List item start.
listItemEnd($tpl)
List item end.
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 (   $a_val)

Set child limit.

Parameters
int$a_valchild limit

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

Referenced by ilRepositoryExplorerGUI\__construct(), and ilRepositorySelectorExplorerGUI\__construct().

103  {
104  $this->child_limit = $a_val;
105  }
+ Here is the caller graph for this function:

◆ setEnableDnd()

ilExplorerBaseGUI::setEnableDnd (   $enable_dnd)

Enable Drag & Drop functionality.

Parameters
boolean$enable_dnd

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

References $enable_dnd.

Referenced by ilObjStudyProgrammeTreeExplorerGUI\__construct().

1056  {
1057  $this->enable_dnd = $enable_dnd;
1058  }
+ Here is the caller graph for this function:

◆ setMainTemplate()

ilExplorerBaseGUI::setMainTemplate (   $a_main_tpl = null)

Set main template (that is responsible for adding js/css)

Parameters
ilTemplate | null$a_main_tpl

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

144  {
145  $this->tpl = $a_main_tpl;
146  }

◆ setNodeOnclickEnabled()

ilExplorerBaseGUI::setNodeOnclickEnabled (   $nodeOnclickEnabled)
Parameters
boolean$nodeOnclickEnabled

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

References $nodeOnclickEnabled.

Referenced by ilLSTOCGUI\__construct().

1042  {
1043  $this->nodeOnclickEnabled = $nodeOnclickEnabled;
1044  }
+ 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

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

Referenced by ilLMTableOfContentsExplorerGUI\__construct(), ilMediaPoolExplorerGUI\__construct(), ilForumExplorerGUI\__construct(), ilRepositoryExplorerGUI\__construct(), ilPublicSectionExplorerGUI\beforeRendering(), ilKSDocumentationExplorerGUI\openNodesRecursively(), and ilTreeExplorerGUI\setPathOpen().

449  {
450  if (!in_array($a_id, $this->custom_open_nodes)) {
451  $this->custom_open_nodes[] = $a_id;
452  }
453  }
+ 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

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

Referenced by ilPublicSectionExplorerGUI\beforeRendering(), and ilSkillSelectorGUI\setSkillSelected().

500  {
501  if (!in_array($a_id, $this->selected_nodes)) {
502  $this->selected_nodes[] = $a_id;
503  }
504  }
+ Here is the caller graph for this function:

◆ setOfflineMode()

ilExplorerBaseGUI::setOfflineMode (   $a_val)

Set offline mode.

Parameters
bool$a_valoffline mode

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

Referenced by ilKSDocumentationExplorerGUI\__construct().

512  {
513  $this->offline_mode = $a_val;
514  }
+ Here is the caller graph for this function:

◆ setSearchTerm()

ilExplorerBaseGUI::setSearchTerm (   $a_val)

Set search term.

Parameters
string$a_valsearch term

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

Referenced by getNodeAsync().

123  {
124  $this->search_term = $a_val;
125  }
+ Here is the caller graph for this function:

◆ setSecondaryHighlightedNodes()

ilExplorerBaseGUI::setSecondaryHighlightedNodes (   $a_val)

Set secondary (background) highlighted nodes.

Parameters
array$a_valarray of node ids

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

Referenced by ilLMTOCExplorerGUI\__construct().

428  {
429  $this->sec_highl_nodes = $a_val;
430  }
+ Here is the caller graph for this function:

◆ setSelectMode()

ilExplorerBaseGUI::setSelectMode (   $a_postvar,
  $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
boolean$a_multimulti select (checkboxes) or not (radio)
Returns

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

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

488  {
489  $this->select_postvar = $a_postvar;
490  $this->select_multi = $a_multi;
491  }
+ Here is the caller graph for this function:

◆ setSkipRootNode()

◆ sortChilds()

ilExplorerBaseGUI::sortChilds (   $a_childs,
  $a_parent_node_id 
)

Sort childs.

Parameters
array$a_childsarray of child nodes
mixed$a_parent_nodeparent node
Returns
array array of childs nodes

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

Referenced by getHTML(), and renderChilds().

270  {
271  return $a_childs;
272  }
+ Here is the caller graph for this function:

Field Documentation

◆ $ajax

ilExplorerBaseGUI::$ajax = false
protected

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

Referenced by getAjax().

◆ $child_limit

ilExplorerBaseGUI::$child_limit = 0
protected

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

Referenced by getChildLimit().

◆ $ctrl

◆ $custom_open_nodes

ilExplorerBaseGUI::$custom_open_nodes = array()
protected

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

◆ $enable_dnd

ilExplorerBaseGUI::$enable_dnd = false
protected

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

Referenced by isEnableDnd(), and setEnableDnd().

◆ $js_expl_path

ilExplorerBaseGUI::$js_expl_path = "./Services/UIComponent/Explorer2/js/Explorer2.js"
staticprotected

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

◆ $js_tree_path

ilExplorerBaseGUI::$js_tree_path = "./libs/bower/bower_components/jstree/dist/jstree.js"
staticprotected

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

◆ $js_tree_path_css

ilExplorerBaseGUI::$js_tree_path_css = "./libs/bower/bower_components/jstree/dist/themes/default/style.min.css"
staticprotected

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

◆ $log

ilExplorerBaseGUI::$log
protected

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

Referenced by closeNode(), and openNode().

◆ $nodeOnclickEnabled

ilExplorerBaseGUI::$nodeOnclickEnabled
private

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

Referenced by isNodeOnclickEnabled(), and setNodeOnclickEnabled().

◆ $offline_mode

ilExplorerBaseGUI::$offline_mode = false
protected

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

Referenced by getOfflineMode().

◆ $open_nodes

ilExplorerBaseGUI::$open_nodes = []
protected

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

Referenced by __construct(), and getOnLoadCode().

◆ $parent_cmd

ilExplorerBaseGUI::$parent_cmd = ''
protected

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

◆ $parent_obj

◆ $search_term

ilExplorerBaseGUI::$search_term = ""
protected

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

Referenced by getSearchTerm().

◆ $sec_highl_nodes

ilExplorerBaseGUI::$sec_highl_nodes = array()
protected

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

Referenced by getSecondaryHighlightedNodes().

◆ $select_postvar

ilExplorerBaseGUI::$select_postvar = ""
protected

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

Referenced by ilSkillSelectorGUI\getSelectedSkills().

◆ $selected_nodes

ilExplorerBaseGUI::$selected_nodes = array()
protected

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

◆ $skip_root_node

ilExplorerBaseGUI::$skip_root_node = false
protected

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

Referenced by getSkipRootNode().

◆ $store

ilExplorerBaseGUI::$store
protected

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

◆ $tpl

ilExplorerBaseGUI::$tpl
protected

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