ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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...
 
 setPathOpen ($a_id)
 Set node path to be opened. More...
 
 getHTML ()
 Get HTML. More...
 
- Public Member Functions inherited from ilExplorerBaseGUI
 __construct ($a_expl_id, $a_parent_obj, $a_parent_cmd)
 Constructor. 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...
 

Protected Attributes

 $type_grps = array()
 
 $session_materials = array()
 
- Protected Attributes inherited from ilTreeExplorerGUI
 $tree = null
 
 $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()
 
- Protected Attributes inherited from ilExplorerBaseGUI
 $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
 

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 createHTMLExportDirs ($a_target_dir)
 Create html export directories. More...
 
static init ()
 Init JS. More...
 
- Protected Member Functions inherited from ilTreeExplorerGUI
 preloadChilds ()
 Preload childs. 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...
 
 getJSTreePlugins ()
 
- Static Protected Attributes inherited from ilExplorerBaseGUI
static $js_tree_path = "./Services/UIComponent/Explorer2/lib/jstree-v.pre1.0/jquery.jstree.js"
 
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 24 of file class.ilAdministrationExplorerGUI.php.

25 {
26 global $tree, $ilSetting, $objDefinition;
27
28 $this->cur_ref_id = (int) $_GET["ref_id"];
29
30 $this->top_node_id = 0;
31 parent::__construct("adm_exp", $a_parent_obj, $a_parent_cmd, $tree);
32
33 $this->setSkipRootNode(false);
34 $this->setAjax(true);
35 $this->setOrderField("title");
36
37 $white = array();
38 foreach ($objDefinition->getSubObjectsRecursively("root") as $rtype)
39 {
40 if ($rtype["name"] != "itgr" && !$objDefinition->isSideBlock($rtype["name"]))
41 {
42 $white[] = $rtype["name"];
43 }
44 }
46
47 if ((int) $_GET["ref_id"] > 0)
48 {
49 $this->setPathOpen((int) $_GET["ref_id"]);
50 }
51 }
$_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.
$white
Definition: example_030.php:84
global $ilSetting
Definition: privfeed.php:40

References $_GET, $ilSetting, ilTreeExplorerGUI\$tree, $white, ilExplorerBaseGUI\setAjax(), ilTreeExplorerGUI\setOrderField(), ilTreeExplorerGUI\setPathOpen(), ilExplorerBaseGUI\setSkipRootNode(), and ilTreeExplorerGUI\setTypeWhiteList().

+ 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 238 of file class.ilAdministrationExplorerGUI.php.

239 {
240 global $rbacsystem;
241
242 if (!$rbacsystem->checkAccess("read", $a_parent_node_id))
243 {
244 return array();
245 }
246
247 return parent::getChildsOfNode($a_parent_node_id);
248 }

◆ getNodeContent()

ilAdministrationExplorerGUI::getNodeContent (   $a_node)

Get node content.

Parameters
array
Returns

Reimplemented from ilExplorerBaseGUI.

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

60 {
61 global $lng;
62
63 $title = $a_node["title"];
64 if ($a_node["child"] == $this->getNodeId($this->getRootNode()))
65 {
66 if ($title == "ILIAS")
67 {
68 $title = $lng->txt("repository");
69 }
70 }
71
72 return $title;
73 }
getNodeId($a_node)
Get id for node.
global $lng
Definition: privfeed.php:40

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 133 of file class.ilAdministrationExplorerGUI.php.

134 {
135 global $ilCtrl, $objDefinition;
136
137 $class_name = $objDefinition->getClassName($a_node["type"]);
138 $class = strtolower("ilObj".$class_name."GUI");
139 $ilCtrl->setParameterByClass($class, "ref_id", $a_node["child"]);
140 $link = $ilCtrl->getLinkTargetByClass($class, "view");
141 $ilCtrl->setParameterByClass($class, "ref_id", $_GET["ref_id"]);
142
143 return $link;
144 }
global $ilCtrl
Definition: ilias.php:18

References $_GET, and $ilCtrl.

◆ getNodeIcon()

ilAdministrationExplorerGUI::getNodeIcon (   $a_node)

Get node icon.

Parameters
array
Returns

Reimplemented from ilExplorerBaseGUI.

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

82 {
83 $obj_id = ilObject::_lookupObjId($a_node["child"]);
84 return ilObject::_getIcon($obj_id, "tiny", $a_node["type"]);
85 }
static _lookupObjId($a_id)
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.

References ilObject\_getIcon(), and 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 93 of file class.ilAdministrationExplorerGUI.php.

94 {
95 global $lng;
96
97 if ($a_node["child"] == $this->getNodeId($this->getRootNode()))
98 {
99 $title = $a_node["title"];
100 if ($title == "ILIAS")
101 {
102 $title = $lng->txt("repository");
103 }
104 return $lng->txt("icon")." ".$title;
105 }
106
107
108 return parent::getNodeIconAlt($a_node);
109 }

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 256 of file class.ilAdministrationExplorerGUI.php.

257 {
258 global $rbacsystem,$tree,$ilDB,$ilUser,$ilAccess;
259
260 return $rbacsystem->checkAccess('read', $a_node["child"]);
261 }
global $ilDB
global $ilUser
Definition: imgupload.php:15

References $ilDB, $ilUser, and ilTreeExplorerGUI\$tree.

◆ 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 117 of file class.ilAdministrationExplorerGUI.php.

118 {
119 if ($a_node["child"] == $_GET["ref_id"] ||
120 ($_GET["ref_id"] == "" && $a_node["child"] == $this->getNodeId($this->getRootNode())))
121 {
122 return true;
123 }
124 return false;
125 }

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 152 of file class.ilAdministrationExplorerGUI.php.

153 {
154 global $rbacsystem;
155
156 $visible = $rbacsystem->checkAccess('visible', $a_node["child"]);
157 if ($a_node["type"] == "rolf" && $a_node["child"] != ROLE_FOLDER_ID)
158 {
159 return false;
160 }
161 return $visible;
162 }

◆ 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 172 of file class.ilAdministrationExplorerGUI.php.

173 {
174 global $objDefinition;
175
176 $parent_obj_id = ilObject::_lookupObjId($a_parent_node_id);
177
178 if ($parent_obj_id > 0)
179 {
180 $parent_type = ilObject::_lookupType($parent_obj_id);
181 }
182 else
183 {
184 $parent_type = "dummy";
185 $this->type_grps["dummy"] = array("root" => "dummy");
186 }
187
188 if (empty($this->type_grps[$parent_type]))
189 {
190 $this->type_grps[$parent_type] =
191 $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
192 }
193 $group = array();
194
195 foreach ($a_childs as $child)
196 {
197 $g = $objDefinition->getGroupOfObj($child["type"]);
198 if ($g == "")
199 {
200 $g = $child["type"];
201 }
202 $group[$g][] = $child;
203 }
204
205 $childs = array();
206 foreach ($this->type_grps[$parent_type] as $t => $g)
207 {
208 if (is_array($group[$t]))
209 {
210 // do we have to sort this group??
211 include_once("./Services/Container/classes/class.ilContainer.php");
212 include_once("./Services/Container/classes/class.ilContainerSorting.php");
213 $sort = ilContainerSorting::_getInstance($parent_obj_id);
214 $group = $sort->sortItems($group);
215
216 // need extra session sorting here
217 if ($t == "sess")
218 {
219
220 }
221
222 foreach ($group[$t] as $k => $item)
223 {
224 $childs[] = $item;
225 }
226 }
227 }
228
229 return $childs;
230 }
static _getInstance($a_obj_id)
get instance by obj_id
static _lookupType($a_id, $a_reference=false)
lookup object type

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

+ Here is the call graph for this function:

Field Documentation

◆ $session_materials

ilAdministrationExplorerGUI::$session_materials = array()
protected

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

◆ $type_grps

ilAdministrationExplorerGUI::$type_grps = array()
protected

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


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