ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilAdministrationExplorer Class Reference
+ Inheritance diagram for ilAdministrationExplorer:
+ Collaboration diagram for ilAdministrationExplorer:

Public Member Functions

 ilAdministrationExplorer ($a_target)
 Constructor @access public. More...
 
 formatHeader (&$tpl, $a_obj_id, $a_option)
 overwritten method from base class @access public More...
 
 buildLinkTarget ($a_node_id, $a_type)
 build link target More...
 
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 get frame target (may be overwritten by derived classes) More...
 
 getImage ($a_name, $a_type="", $a_obj_id="")
 get image path More...
 
 isClickable ($a_type, $a_ref_id)
 check if links for certain object type are activated More...
 
 isVisible ($a_ref_id, $a_type)
 
 modifyChilds ($a_parent_id, $a_objects)
 modify children of parent () More...
 
 showChilds ($a_parent_id, $a_obj_id)
 
 forceExpanded ($a_obj_id)
 force expansion of node More...
 
- Public Member Functions inherited from ilExplorer
 ilExplorer ($a_target)
 Constructor @access public. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setAsynchExpanding ($a_val)
 Set asynch expanding. More...
 
 getAsynchExpanding ()
 Get asynch expanding. More...
 
 initItemCounter ($a_number)
 Init item counter. More...
 
 setTitle ($a_val)
 Set title. More...
 
 setTitleLength ($a_length)
 Set max title length. More...
 
 getTitleLength ()
 Get max title length. More...
 
 getTitle ()
 Get title. More...
 
 setRoot ($a_root_id)
 Set root node. More...
 
 getRoot ()
 get root id More...
 
 setOrderColumn ($a_column)
 set the order column @access public More...
 
 setOrderDirection ($a_direction)
 set the order direction @access public More...
 
 setTargetGet ($a_target_get)
 set the varname in Get-string @access public More...
 
 setParamsGet ($a_params_get)
 set additional params to be passed in Get-string @access public More...
 
 setExpandTarget ($a_exp_target)
 target script for expand icons More...
 
 setFrameUpdater ($a_up_frame, $a_up_script, $a_params="")
 Set Explorer Updater. More...
 
 highlightNode ($a_id)
 set highlighted node More...
 
 checkPermissions ($a_check)
 check permissions via rbac More...
 
 setSessionExpandVariable ($a_var_name="expand")
 set name of expand session variable More...
 
 outputIcons ($a_icons)
 output icons More...
 
 setClickable ($a_type, $a_clickable)
 (de-)activates links for a certain object type More...
 
 isVisible ($a_ref_id, $a_type)
 
 setTreeLead ($a_val)
 Set tree leading content. More...
 
 getTreeLead ()
 Get tree leading content. More...
 
 isClickable ($a_type, $a_ref_id=0)
 check if links for certain object type are activated More...
 
 setPostSort ($a_sort)
 process post sorting More...
 
 setFilterMode ($a_mode=IL_FM_NEGATIVE)
 set filter mode More...
 
 getFilterMode ()
 get filter mode More...
 
 setUseStandardFrame ($a_val)
 Set use standard frame. More...
 
 getUseStandardFrame ()
 Get use standard explorer frame. More...
 
 getChildsOfNode ($a_parent_id)
 Get childs of node. More...
 
 setOutput ($a_parent_id, $a_depth=1, $a_obj_id=0, $a_highlighted_subtree=false)
 Creates output for explorer view in admin menue recursive method @access public. More...
 
 modifyChilds ($a_parent_id, $a_objects)
 
 showChilds ($a_parent_id)
 determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g. More...
 
 forceExpanded ($a_obj_id)
 force expansion of node More...
 
 getMaximumTreeDepth ()
 Get maximum tree depth. More...
 
 getOutput ()
 Creates output recursive method @access public. More...
 
 handleListEndTags (&$a_tpl_tree, $a_cur_depth, $a_item_depth)
 handle list end tags ( and ) More...
 
 handleListStartTags (&$a_tpl_tree, $a_cur_depth, $a_item_depth)
 handle list start tags ( More...
 
 formatHeader (&$tpl, $a_obj_id, $a_option)
 Creates output for header (is empty here but can be overwritten in derived classes) More...
 
 formatObject (&$tpl, $a_node_id, $a_option, $a_obj_id=0)
 Creates output recursive method @access private. More...
 
 getImage ($a_name, $a_type="", $a_obj_id="")
 get image path (may be overwritten by derived classes) More...
 
 getImageAlt ($a_default_text, $a_type="", $a_obj_id="")
 get image alt text More...
 
 getNodeStyleClass ($a_id, $a_type)
 get style class for node More...
 
 buildLinkTarget ($a_node_id, $a_type)
 get link target (may be overwritten by derived classes) More...
 
 buildOnClick ($a_node_id, $a_type, $a_title)
 get onclick event handling (may be overwritten by derived classes) More...
 
 buildTitle ($a_title, $a_id, $a_type)
 standard implementation for title, may be overwritten by derived classes More...
 
 buildDescription ($a_desc, $a_id, $a_type)
 standard implementation for description, may be overwritten by derived classes More...
 
 buildSelect ($a_node_id, $a_type)
 standard implementation for adding an option select box between image and title More...
 
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 get frame target (may be overwritten by derived classes) More...
 
 createTarget ($a_type, $a_node_id, $a_highlighted_subtree=false, $a_append_anch=true)
 Creates Get Parameter @access private. More...
 
 setFrameTarget ($a_target)
 set target frame or not frame? More...
 
 createLines ($a_depth)
 Creates lines for explorer view @access private. More...
 
 is_in_array ($a_start, $a_depth)
 DESCRIPTION MISSING @access private. More...
 
 getIndex ($a_data)
 get index of format_options array from specific ref_id,parent_id @access private More...
 
 addFilter ($a_item)
 adds item to the filter @access public More...
 
 delFilter ($a_item)
 removes item from the filter @access public More...
 
 setExpand ($a_node_id)
 set the expand option this value is stored in a SESSION variable to save it different view (lo view, frm view,...) @access private More...
 
 forceExpandAll ($a_mode, $a_show_minus=true)
 force expandAll. More...
 
 setFiltered ($a_bool)
 active/deactivate the filter @access public More...
 
 checkFilter ($a_item)
 check if item is in filter @access private More...
 
 sortNodes ($a_nodes, $a_parent_obj_id)
 sort nodes and put adm object to the end of sorted array @access private More...
 

Data Fields

 $root_id
 
 $output
 
 $ctrl
 
- Data Fields inherited from ilExplorer
 $id
 
 $ilias
 
 $output
 
 $format_options
 
 $tree
 
 $target
 
 $target_get
 
 $params_get
 
 $expanded
 
 $order_column
 
 $order_direction = "asc"
 
 $expand_target
 
 $rbac_check
 
 $output_icons
 
 $expand_variable
 
 $is_clickable
 
 $post_sort
 
 $filtered = false
 
 $filter_mode
 
 $expand_all = false
 
 $root_id = null
 
 $use_standard_frame = false
 

Detailed Description

Definition at line 14 of file class.ilAdministrationExplorer.php.

Member Function Documentation

◆ buildFrameTarget()

ilAdministrationExplorer::buildFrameTarget (   $a_type,
  $a_child = 0,
  $a_obj_id = 0 
)

get frame target (may be overwritten by derived classes)

Reimplemented from ilExplorer.

Definition at line 113 of file class.ilAdministrationExplorer.php.

114 {
115 if ($_GET["admin_mode"] == "settings" && $a_child == ROOT_FOLDER_ID)
116 {
117 return ilFrameTargetInfo::_getFrame("MainContent");
118 }
119 else
120 {
121 return $this->frame_target;
122 }
123 }
$_GET["client_id"]
static _getFrame($a_class, $a_type='')
Get content frame name.

References $_GET, and ilFrameTargetInfo\_getFrame().

+ Here is the call graph for this function:

◆ buildLinkTarget()

ilAdministrationExplorer::buildLinkTarget (   $a_node_id,
  $a_type 
)

build link target

Reimplemented from ilExplorer.

Definition at line 85 of file class.ilAdministrationExplorer.php.

86 {
87 global $ilCtrl, $objDefinition;
88
89 if ($a_type == "" || $a_type == "xxx")
90 {
91 return;
92 }
93 if ($_GET["admin_mode"] == "settings" && $a_node_id == ROOT_FOLDER_ID)
94 {
95 $this->ctrl->setParameterByClass("iladministrationgui", "ref_id", ROOT_FOLDER_ID);
96 $this->ctrl->setParameterByClass("iladministrationgui", "admin_mode", "repository");
97 $link = $this->ctrl->getLinkTargetByClass("iladministrationgui", "frameset");
98 $this->ctrl->setParameterByClass("iladministrationgui", "admin_mode", "settings");
99 }
100 else
101 {
102 $class_name = $objDefinition->getClassName($a_type);
103 $class = strtolower("ilObj".$class_name."GUI");
104 $this->ctrl->setParameterByClass($class, "ref_id", $a_node_id);
105 $link = $this->ctrl->getLinkTargetByClass($class, "view");
106 }
107 return $link;
108 }
global $ilCtrl
Definition: ilias.php:18

References $_GET, and $ilCtrl.

◆ forceExpanded()

ilAdministrationExplorer::forceExpanded (   $a_obj_id)

force expansion of node

Reimplemented from ilExplorer.

Definition at line 234 of file class.ilAdministrationExplorer.php.

235 {
236 if ($a_obj_id == SYSTEM_FOLDER_ID)
237 {
238 return true;
239 }
240 else
241 {
242 return false;
243 }
244 }

◆ formatHeader()

ilAdministrationExplorer::formatHeader ( $tpl,
  $a_obj_id,
  $a_option 
)

overwritten method from base class @access public

Parameters
integerobj_id
integerarray options
Returns
string

Reimplemented from ilExplorer.

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

53 {
54 global $lng, $ilias, $objDefinition;
55
56 if ($_GET["admin_mode"] == "settings")
57 {
58 return;
59 }
60
61 $tpl->setCurrentBlock("icon");
62 $tpl->setVariable("ICON_IMAGE" , ilUtil::getImagePath("icon_root.svg"));
63 $tpl->setVariable("TXT_ALT_IMG", $lng->txt("repository"));
64 $tpl->parseCurrentBlock();
65
66 $class_name = $objDefinition->getClassName("root");
67 $class = strtolower("ilObj".$class_name."GUI");
68 $this->ctrl->setParameterByClass($class, "ref_id", ROOT_FOLDER_ID);
69 $link = $this->ctrl->getLinkTargetByClass($class, "view");
70
71 $tpl->setCurrentBlock("link");
72 $tpl->setVariable("TITLE", $lng->txt("repository"));
73 $tpl->setVariable("LINK_TARGET", $link);
74 $tpl->setVariable("TARGET", " target=\"content\"");
75 $tpl->parseCurrentBlock();
76
77 $tpl->setCurrentBlock("element");
78 $tpl->parseCurrentBlock();
79
80 }
global $tpl
Definition: ilias.php:8
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $lng
Definition: privfeed.php:40

References $_GET, ilExplorer\$ilias, $lng, $tpl, and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ getImage()

ilAdministrationExplorer::getImage (   $a_name,
  $a_type = "",
  $a_obj_id = "" 
)

get image path

Reimplemented from ilExplorer.

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

130 {
131 if ($a_type != "")
132 {
133 return ilObject::_getIcon($a_obj_id, "tiny", $a_type);
134 }
135
136 return parent::getImage($a_name);
137 }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.

References ilObject\_getIcon().

+ Here is the call graph for this function:

◆ ilAdministrationExplorer()

ilAdministrationExplorer::ilAdministrationExplorer (   $a_target)

Constructor @access public.

Parameters
stringscriptname
intuser_id

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

32 {
33 global $tree,$ilCtrl,$lng;
34
35 $this->ctrl = $ilCtrl;
36
37 parent::ilExplorer($a_target);
38 $this->tree = $tree;
39 $this->root_id = $this->tree->readRootId();
40 $this->order_column = "title";
41 $this->setSessionExpandVariable("expand");
42 $this->setTitle($lng->txt("overview"));
43 }
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
setTitle($a_val)
Set title.

References $ilCtrl, $lng, ilExplorer\$tree, ilExplorer\setSessionExpandVariable(), and ilExplorer\setTitle().

+ Here is the call graph for this function:

◆ isClickable()

ilAdministrationExplorer::isClickable (   $a_type,
  $a_ref_id 
)

check if links for certain object type are activated

Parameters
string$a_typeobject type
Returns
boolean true if linking is activated

Reimplemented from ilExplorer.

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

140 {
141 global $rbacsystem;
142
143 return $rbacsystem->checkAccess('read',$a_ref_id);
144 }

◆ isVisible()

ilAdministrationExplorer::isVisible (   $a_ref_id,
  $a_type 
)

Reimplemented from ilExplorer.

Definition at line 146 of file class.ilAdministrationExplorer.php.

147 {
148 global $rbacsystem, $ilBench;
149
150 if ($this->tree->getParentId($a_ref_id) == ROOT_FOLDER_ID && $a_type != "adm" &&
151 $_GET["admin_mode"] != "repository")
152 {
153 return false;
154 }
155
156 // these objects may exist due to test cases that didnt clear
157 // data properly
158 if ($a_type == "" || $a_type == "xxx")
159 {
160 return false;
161 }
162
163 $ilBench->start("Explorer", "setOutput_isVisible");
164 $visible = $rbacsystem->checkAccess('visible',$a_ref_id);
165 if ($a_type == "rolf" && $a_ref_id != ROLE_FOLDER_ID)
166 {
167 return false;
168 }
169
170 $ilBench->stop("Explorer", "setOutput_isVisible");
171 return $visible;
172 }
global $ilBench
Definition: ilias.php:18

References $_GET, and $ilBench.

◆ modifyChilds()

ilAdministrationExplorer::modifyChilds (   $a_parent_id,
  $a_objects 
)

modify children of parent ()

Reimplemented from ilExplorer.

Definition at line 177 of file class.ilAdministrationExplorer.php.

178 {
179 global $lng,$rbacsystem;
180
181 if ($a_parent_id == SYSTEM_FOLDER_ID)
182 {
183 $new_objects = array();
184 foreach($a_objects as $object)
185 {
186 $new_objects[$object["title"].":".$object["child"]]
187 = $object;
188 }
189
190 // add entry for switching to repository admin
191 // note: please see showChilds methods which prevents infinite look
192 if($rbacsystem->checkAccess('write',SYSTEM_FOLDER_ID))
193 {
194 $new_objects[$lng->txt("repository_admin").":".ROOT_FOLDER_ID] =
195 array(
196 "tree" => 1,
197 "child" => ROOT_FOLDER_ID,
198 "ref_id" => ROOT_FOLDER_ID,
199 "depth" => 3,
200 "type" => "root",
201 "title" => $lng->txt("repository_admin"),
202 "description" => $lng->txt("repository_admin_desc"),
203 "desc" => $lng->txt("repository_admin_desc"),
204 );
205 }
206 ksort($new_objects);
207
208 return $new_objects;
209 }
210
211 return $a_objects;
212 }

References $lng.

◆ showChilds()

ilAdministrationExplorer::showChilds (   $a_parent_id,
  $a_obj_id 
)

Definition at line 214 of file class.ilAdministrationExplorer.php.

215 {
216
217 // prevent infinite loop due to (root folder tree) node
218 // that is inserted under system admin folder
219 if ($a_parent_id == ROOT_FOLDER_ID)
220 {
221 if ($this->rootfolder_shown == true)
222 {
223 return false;
224 }
225 $this->rootfolder_shown = true;
226 }
227
228 return true;
229 }

Field Documentation

◆ $ctrl

ilAdministrationExplorer::$ctrl

Definition at line 24 of file class.ilAdministrationExplorer.php.

◆ $output

ilAdministrationExplorer::$output

Definition at line 23 of file class.ilAdministrationExplorer.php.

◆ $root_id

ilAdministrationExplorer::$root_id

Definition at line 22 of file class.ilAdministrationExplorer.php.


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