ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilAdministrationExplorerGUI Class Reference

Administration explorer GUI class. More...

+ Inheritance diagram for ilAdministrationExplorerGUI:
+ Collaboration diagram for ilAdministrationExplorerGUI:

Public Member Functions

 __construct ($a_parent_obj, $a_parent_cmd)
 Constructor. More...
 
 getNodeContent ($a_node)
 Get node content. More...
 
 getNodeIcon ($a_node)
 Get node icon. More...
 
 getNodeIconAlt ($a_node)
 Get node icon alt text. More...
 
 isNodeHighlighted ($a_node)
 Is node highlighted? More...
 
 getNodeHref ($a_node)
 Get href for node. More...
 
 isNodeVisible ($a_node)
 Is node visible. More...
 
 sortChilds ($a_childs, $a_parent_node_id)
 Sort childs. More...
 
 getChildsOfNode ($a_parent_node_id)
 Get childs of node. More...
 
 isNodeClickable ($a_node)
 Is node clickable? More...
 
- Public Member Functions inherited from ilTreeExplorerGUI
 __construct ($a_expl_id, $a_parent_obj, $a_parent_cmd, $a_tree)
 Constructor. More...
 
 getTree ()
 Get tree. More...
 
 setOrderField ($a_val, $a_numeric=false)
 Set order field. More...
 
 getOrderField ()
 Get order field. More...
 
 setTypeWhiteList ($a_val)
 Set type white list. More...
 
 getTypeWhiteList ()
 Get type white list. More...
 
 setTypeBlackList ($a_val)
 Set type black list. More...
 
 getTypeBlackList ()
 Get type black list. More...
 
 setPreloadChilds ($a_val)
 Set preload childs. More...
 
 getPreloadChilds ()
 Get preload childs. More...
 
 getSuccessorNode ($a_node_id, $a_type="")
 Get successor node (currently only(!) based on lft/rgt tree values) More...
 
 getChildsOfNode ($a_parent_node_id)
 Get childs of node. More...
 
 getNodeId ($a_node)
 Get id for node. More...
 
 getNodeIconAlt ($a_node)
 Get node icon alt attribute. More...
 
 getRootNode ()
 Get root node. More...
 
 setRootId ($a_root)
 
 setPathOpen ($a_id)
 Set node path to be opened. More...
 
 getHTML ($new=false)
 Get HTML. More...
 
 getChildren ($node, $environment=null)
 Get a list of records (that list can also be empty).Each record will be relayed to $this->build to retrieve a Node. Also, each record will be asked for Sub-Nodes using this function.
Returns
array
More...
 
 build (\ILIAS\UI\Component\Tree\Node\Factory $factory, $record, $environment=null)
 
 getTreeLabel ()
 
 getTreeComponent ()
 Get Tree UI. More...
 
 toggleExplorerNodeState ()
 Should be called by an ilCtrl-enabled command class if a tree node toggle action should be processed. More...
 
- Public Member Functions inherited from ilExplorerBaseGUI
 __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...
 
- Public Member Functions inherited from ILIAS\UI\Component\Tree\TreeRecursion
 getChildren ( $record, $environment=null)
 Get a list of records (that list can also be empty). More...
 
 build (Node\Factory $factory, $record, $environment=null)
 Build and return a Node. More...
 

Protected Attributes

 $settings
 
 $obj_definition
 
 $lng
 
 $ctrl
 
 $rbacsystem
 
 $db
 
 $user
 
 $access
 
 $type_grps = array()
 
 $session_materials = array()
 
- Protected Attributes inherited from ilTreeExplorerGUI
 $lng
 
 $httpRequest
 
 $tree = null
 
 $tree_label = ""
 
 $order_field = ""
 
 $order_field_numeric = false
 
 $type_white_list = array()
 
 $type_black_list = array()
 
 $childs = array()
 
 $preloaded = false
 
 $preload_childs = false
 
 $root_node_data = null
 
 $all_childs = array()
 
 $ui
 
- Protected Attributes inherited from ilExplorerBaseGUI
 $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 = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from ilExplorerBaseGUI
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 inherited from ilTreeExplorerGUI
 preloadChilds ()
 Preload childs. More...
 
 matches ($node)
 Does a node match a search term (or is search term empty) More...
 
 getRootId ()
 
 createNode (\ILIAS\UI\Component\Tree\Node\Factory $factory, $record)
 Creates at tree node, can be overwritten in derivatives if another node type should be used. More...
 
 getNodeStateToggleCmdClasses ($record)
 Should return an array of ilCtrl-enabled command classes which should be used to build the URL for the expand/collapse actions applied on a tree node. More...
 
 render ()
 Render tree. More...
 
- Protected Member Functions inherited from ilExplorerBaseGUI
 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 ()
 
- Static Protected Attributes inherited from ilExplorerBaseGUI
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"
 

Detailed Description

Administration explorer GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$
Todo:
: isClickable, top node id

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

Constructor & Destructor Documentation

◆ __construct()

ilAdministrationExplorerGUI::__construct (   $a_parent_obj,
  $a_parent_cmd 
)

Constructor.

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

65 {
66 global $DIC;
67
68 $this->tree = $DIC->repositoryTree();
69 $this->settings = $DIC->settings();
70 $this->obj_definition = $DIC["objDefinition"];
71 $this->lng = $DIC->language();
72 $this->ctrl = $DIC->ctrl();
73 $this->rbacsystem = $DIC->rbac()->system();
74 $this->db = $DIC->database();
75 $this->user = $DIC->user();
76 $this->access = $DIC->access();
77 $tree = $DIC->repositoryTree();
78 $ilSetting = $DIC->settings();
79 $objDefinition = $DIC["objDefinition"];
80
81 $this->cur_ref_id = (int) $_GET["ref_id"];
82
83 $this->top_node_id = 0;
84 parent::__construct("adm_exp", $a_parent_obj, $a_parent_cmd, $tree);
85
86 $this->setSkipRootNode(false);
87 $this->setAjax(true);
88 $this->setOrderField("title");
89
90 $white = array();
91 foreach ($objDefinition->getSubObjectsRecursively("root") as $rtype) {
92 if ($rtype["name"] != "itgr" && !$objDefinition->isSideBlock($rtype["name"])) {
93 $white[] = $rtype["name"];
94 }
95 }
96 $this->setTypeWhiteList($white);
97
98 if ((int) $_GET["ref_id"] > 0) {
99 $this->setPathOpen((int) $_GET["ref_id"]);
100 }
101 }
user()
Definition: user.php:4
$_GET["client_id"]
setSkipRootNode($a_val)
Set skip root node.
setTypeWhiteList($a_val)
Set type white list.
setPathOpen($a_id)
Set node path to be opened.
setOrderField($a_val, $a_numeric=false)
Set order field.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilSetting
Definition: privfeed.php:17
settings()
Definition: settings.php:2
$DIC
Definition: xapitoken.php:46

References $_GET, $DIC, $ilSetting, ilTreeExplorerGUI\$tree, ILIAS\GlobalScreen\Provider\__construct(), ilExplorerBaseGUI\setAjax(), ilTreeExplorerGUI\setOrderField(), ilTreeExplorerGUI\setPathOpen(), ilExplorerBaseGUI\setSkipRootNode(), settings(), ilTreeExplorerGUI\setTypeWhiteList(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getChildsOfNode()

ilAdministrationExplorerGUI::getChildsOfNode (   $a_parent_node_id)

Get childs of node.

Parameters

return

Reimplemented from ilTreeExplorerGUI.

Definition at line 272 of file class.ilAdministrationExplorerGUI.php.

273 {
275
276 if (!$rbacsystem->checkAccess("read", $a_parent_node_id)) {
277 return array();
278 }
279
280 return parent::getChildsOfNode($a_parent_node_id);
281 }

References $rbacsystem.

◆ getNodeContent()

ilAdministrationExplorerGUI::getNodeContent (   $a_node)

Get node content.

Parameters
array
Returns

Reimplemented from ilExplorerBaseGUI.

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

110 {
112
113 $title = $a_node["title"];
114 if ($a_node["child"] == $this->getNodeId($this->getRootNode())) {
115 if ($title == "ILIAS") {
116 $title = $lng->txt("repository");
117 }
118 }
119
120 return $title;
121 }
getNodeId($a_node)
Get id for node.

References $lng, ilTreeExplorerGUI\getNodeId(), and ilTreeExplorerGUI\getRootNode().

+ Here is the call graph for this function:

◆ getNodeHref()

ilAdministrationExplorerGUI::getNodeHref (   $a_node)

Get href for node.

Parameters
mixed$a_nodenode object/array
Returns
string href attribute

Reimplemented from ilExplorerBaseGUI.

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

179 {
181 $objDefinition = $this->obj_definition;
182
183 $class_name = $objDefinition->getClassName($a_node["type"]);
184 $class = strtolower("ilObj" . $class_name . "GUI");
185 $ilCtrl->setParameterByClass($class, "ref_id", $a_node["child"]);
186 $link = $ilCtrl->getLinkTargetByClass($class, "view");
187 $ilCtrl->setParameterByClass($class, "ref_id", $_GET["ref_id"]);
188
189 return $link;
190 }
global $ilCtrl
Definition: ilias.php:18

References $_GET, $ctrl, $ilCtrl, and $obj_definition.

◆ getNodeIcon()

ilAdministrationExplorerGUI::getNodeIcon (   $a_node)

Get node icon.

Parameters
array
Returns

Reimplemented from ilExplorerBaseGUI.

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

130 {
131 $obj_id = ilObject::_lookupObjId($a_node["child"]);
132 return ilObject::_getIcon($obj_id, "tiny", $a_node["type"]);
133 }
static _lookupObjId($a_id)

References ilObject\_lookupObjId().

+ Here is the call graph for this function:

◆ getNodeIconAlt()

ilAdministrationExplorerGUI::getNodeIconAlt (   $a_node)

Get node icon alt text.

Parameters
arraynode array
Returns
string alt text

Reimplemented from ilTreeExplorerGUI.

Definition at line 141 of file class.ilAdministrationExplorerGUI.php.

142 {
144
145 if ($a_node["child"] == $this->getNodeId($this->getRootNode())) {
146 $title = $a_node["title"];
147 if ($title == "ILIAS") {
148 $title = $lng->txt("repository");
149 }
150 return $lng->txt("icon") . " " . $title;
151 }
152
153
154 return parent::getNodeIconAlt($a_node);
155 }

References $lng, ilTreeExplorerGUI\getNodeId(), and ilTreeExplorerGUI\getRootNode().

+ Here is the call graph for this function:

◆ isNodeClickable()

ilAdministrationExplorerGUI::isNodeClickable (   $a_node)

Is node clickable?

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

Reimplemented from ilExplorerBaseGUI.

Definition at line 289 of file class.ilAdministrationExplorerGUI.php.

References $access, $db, $ilDB, $ilUser, $rbacsystem, ilTreeExplorerGUI\$tree, and $user.

◆ isNodeHighlighted()

ilAdministrationExplorerGUI::isNodeHighlighted (   $a_node)

Is node highlighted?

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

Reimplemented from ilExplorerBaseGUI.

Definition at line 163 of file class.ilAdministrationExplorerGUI.php.

164 {
165 if ($a_node["child"] == $_GET["ref_id"] ||
166 ($_GET["ref_id"] == "" && $a_node["child"] == $this->getNodeId($this->getRootNode()))) {
167 return true;
168 }
169 return false;
170 }

References $_GET, ilTreeExplorerGUI\getNodeId(), and ilTreeExplorerGUI\getRootNode().

+ Here is the call graph for this function:

◆ isNodeVisible()

ilAdministrationExplorerGUI::isNodeVisible (   $a_node)

Is node visible.

Parameters

return

Reimplemented from ilExplorerBaseGUI.

Definition at line 198 of file class.ilAdministrationExplorerGUI.php.

199 {
201
202 $visible = $rbacsystem->checkAccess('visible', $a_node["child"]);
203 if ($a_node["type"] == "rolf" && $a_node["child"] != ROLE_FOLDER_ID) {
204 return false;
205 }
206 return $visible;
207 }

References $rbacsystem.

◆ sortChilds()

ilAdministrationExplorerGUI::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

Reimplemented from ilExplorerBaseGUI.

Definition at line 217 of file class.ilAdministrationExplorerGUI.php.

218 {
219 $objDefinition = $this->obj_definition;
220
221 $parent_obj_id = ilObject::_lookupObjId($a_parent_node_id);
222
223 if ($parent_obj_id > 0) {
224 $parent_type = ilObject::_lookupType($parent_obj_id);
225 } else {
226 $parent_type = "dummy";
227 $this->type_grps["dummy"] = array("root" => "dummy");
228 }
229
230 if (empty($this->type_grps[$parent_type])) {
231 $this->type_grps[$parent_type] =
232 $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
233 }
234 $group = array();
235
236 foreach ($a_childs as $child) {
237 $g = $objDefinition->getGroupOfObj($child["type"]);
238 if ($g == "") {
239 $g = $child["type"];
240 }
241 $group[$g][] = $child;
242 }
243
244 $childs = array();
245 foreach ($this->type_grps[$parent_type] as $t => $g) {
246 if (is_array($group[$t])) {
247 // do we have to sort this group??
248 include_once("./Services/Container/classes/class.ilContainer.php");
249 include_once("./Services/Container/classes/class.ilContainerSorting.php");
250 $sort = ilContainerSorting::_getInstance($parent_obj_id);
251 $group = $sort->sortItems($group);
252
253 // need extra session sorting here
254 if ($t == "sess") {
255 }
256
257 foreach ($group[$t] as $k => $item) {
258 $childs[] = $item;
259 }
260 }
261 }
262
263 return $childs;
264 }
static _getInstance($a_obj_id)
get instance by obj_id
static _lookupType($a_id, $a_reference=false)
lookup object type

References ilTreeExplorerGUI\$childs, $obj_definition, ilContainerSorting\_getInstance(), ilObject\_lookupObjId(), and ilObject\_lookupType().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAdministrationExplorerGUI::$access
protected

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

Referenced by isNodeClickable().

◆ $ctrl

ilAdministrationExplorerGUI::$ctrl
protected

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

Referenced by getNodeHref().

◆ $db

ilAdministrationExplorerGUI::$db
protected

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

Referenced by isNodeClickable().

◆ $lng

ilAdministrationExplorerGUI::$lng
protected

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

Referenced by getNodeContent(), and getNodeIconAlt().

◆ $obj_definition

ilAdministrationExplorerGUI::$obj_definition
protected

Definition at line 26 of file class.ilAdministrationExplorerGUI.php.

Referenced by getNodeHref(), and sortChilds().

◆ $rbacsystem

ilAdministrationExplorerGUI::$rbacsystem
protected

◆ $session_materials

ilAdministrationExplorerGUI::$session_materials = array()
protected

Definition at line 59 of file class.ilAdministrationExplorerGUI.php.

◆ $settings

ilAdministrationExplorerGUI::$settings
protected

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

◆ $type_grps

ilAdministrationExplorerGUI::$type_grps = array()
protected

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

◆ $user

ilAdministrationExplorerGUI::$user
protected

Definition at line 51 of file class.ilAdministrationExplorerGUI.php.

Referenced by isNodeClickable().


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