ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAdministrationExplorer Class Reference
+ Inheritance diagram for ilAdministrationExplorer:
+ Collaboration diagram for ilAdministrationExplorer:

Public Member Functions

 __construct ($a_target)
 Constructor public. More...
 
 formatHeader (&$tpl, $a_obj_id, $a_option)
 overwritten method from base class 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)
 
 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
 __construct ($a_target)
 Constructor 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 public More...
 
 setOrderDirection ($a_direction)
 set the order direction public More...
 
 setTargetGet ($a_target_get)
 set the varname in Get-string public More...
 
 setParamsGet ($a_params_get)
 set additional params to be passed in Get-string 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 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 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 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 private. More...
 
 setFrameTarget ($a_target)
 set target frame or not frame? More...
 
 createLines ($a_depth)
 Creates lines for explorer view private. More...
 
 is_in_array ($a_start, $a_depth)
 DESCRIPTION MISSING private. More...
 
 getIndex ($a_data)
 get index of format_options array from specific ref_id,parent_id private More...
 
 addFilter ($a_item)
 adds item to the filter public More...
 
 delFilter ($a_item)
 removes item from the filter 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,...) private More...
 
 forceExpandAll ($a_mode, $a_show_minus=true)
 force expandAll. More...
 
 setFiltered ($a_bool)
 active/deactivate the filter public More...
 
 checkFilter ($a_item)
 check if item is in filter private More...
 
 sortNodes ($a_nodes, $a_parent_obj_id)
 sort nodes and put adm object to the end of sorted array private More...
 

Data Fields

 $root_id
 
 $output
 
 $ctrl
 
- Data Fields inherited from ilExplorer
 $id
 
 $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
 

Protected Attributes

 $lng
 
 $obj_definition
 
 $rbacsystem
 
- Protected Attributes inherited from ilExplorer
 $obj_definition
 
 $error
 
 $rbacsystem
 
 $tpl
 
 $lng
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilAdministrationExplorer::__construct (   $a_target)

Constructor public.

Parameters
stringscriptname
intuser_id

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

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

47  {
48  global $DIC;
49 
50  $this->lng = $DIC->language();
51  $this->obj_definition = $DIC["objDefinition"];
52  $this->rbacsystem = $DIC->rbac()->system();
53  $tree = $DIC->repositoryTree();
54  $ilCtrl = $DIC->ctrl();
55  $lng = $DIC->language();
56 
57  $this->ctrl = $ilCtrl;
58 
59  parent::__construct($a_target);
60  $this->tree = $tree;
61  $this->root_id = $this->tree->readRootId();
62  $this->order_column = "title";
63  $this->setSessionExpandVariable("expand");
64  $this->setTitle($lng->txt("overview"));
65  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
setTitle($a_val)
Set title.
+ Here is the call graph for this function:

Member Function Documentation

◆ buildFrameTarget()

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

get frame target (may be overwritten by derived classes)

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

References $_GET, and ilFrameTargetInfo\_getFrame().

132  {
133  if ($_GET["admin_mode"] == "settings" && $a_child == ROOT_FOLDER_ID) {
134  return ilFrameTargetInfo::_getFrame("MainContent");
135  } else {
136  return $this->frame_target;
137  }
138  }
$_GET["client_id"]
static _getFrame($a_class, $a_type='')
Get content frame name.
+ Here is the call graph for this function:

◆ buildLinkTarget()

ilAdministrationExplorer::buildLinkTarget (   $a_node_id,
  $a_type 
)

build link target

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

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

107  {
109  $objDefinition = $this->obj_definition;
110 
111  if ($a_type == "" || $a_type == "xxx") {
112  return;
113  }
114  if ($_GET["admin_mode"] == "settings" && $a_node_id == ROOT_FOLDER_ID) {
115  $this->ctrl->setParameterByClass("iladministrationgui", "ref_id", ROOT_FOLDER_ID);
116  $this->ctrl->setParameterByClass("iladministrationgui", "admin_mode", "repository");
117  $link = $this->ctrl->getLinkTargetByClass("iladministrationgui", "frameset");
118  $this->ctrl->setParameterByClass("iladministrationgui", "admin_mode", "settings");
119  } else {
120  $class_name = $objDefinition->getClassName($a_type);
121  $class = strtolower("ilObj" . $class_name . "GUI");
122  $this->ctrl->setParameterByClass($class, "ref_id", $a_node_id);
123  $link = $this->ctrl->getLinkTargetByClass($class, "view");
124  }
125  return $link;
126  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
$a_type
Definition: workflow.php:92

◆ forceExpanded()

ilAdministrationExplorer::forceExpanded (   $a_obj_id)

force expansion of node

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

240  {
241  if ($a_obj_id == SYSTEM_FOLDER_ID) {
242  return true;
243  } else {
244  return false;
245  }
246  }

◆ formatHeader()

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

overwritten method from base class public

Parameters
integerobj_id
integerarray options
Returns
string

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

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

75  {
76  $lng = $this->lng;
77  $objDefinition = $this->obj_definition;
78 
79  if ($_GET["admin_mode"] == "settings") {
80  return;
81  }
82 
83  $tpl->setCurrentBlock("icon");
84  $tpl->setVariable("ICON_IMAGE", ilUtil::getImagePath("icon_root.svg"));
85  $tpl->setVariable("TXT_ALT_IMG", $lng->txt("repository"));
86  $tpl->parseCurrentBlock();
87 
88  $class_name = $objDefinition->getClassName("root");
89  $class = strtolower("ilObj" . $class_name . "GUI");
90  $this->ctrl->setParameterByClass($class, "ref_id", ROOT_FOLDER_ID);
91  $link = $this->ctrl->getLinkTargetByClass($class, "view");
92 
93  $tpl->setCurrentBlock("link");
94  $tpl->setVariable("TITLE", $lng->txt("repository"));
95  $tpl->setVariable("LINK_TARGET", $link);
96  $tpl->setVariable("TARGET", " target=\"content\"");
97  $tpl->parseCurrentBlock();
98 
99  $tpl->setCurrentBlock("element");
100  $tpl->parseCurrentBlock();
101  }
$_GET["client_id"]
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

◆ getImage()

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

get image path

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

References $a_type, and ilObject\_getIcon().

145  {
146  if ($a_type != "") {
147  return ilObject::_getIcon($a_obj_id, "tiny", $a_type);
148  }
149 
150  return parent::getImage($a_name);
151  }
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
$a_type
Definition: workflow.php:92
+ Here is the call graph for this function:

◆ isClickable()

ilAdministrationExplorer::isClickable (   $a_type,
  $a_ref_id 
)

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

References $rbacsystem.

154  {
156 
157  return $rbacsystem->checkAccess('read', $a_ref_id);
158  }

◆ isVisible()

ilAdministrationExplorer::isVisible (   $a_ref_id,
  $a_type 
)

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

References $_GET, $a_type, and $rbacsystem.

161  {
163 
164  if ($this->tree->getParentId($a_ref_id) == ROOT_FOLDER_ID && $a_type != "adm" &&
165  $_GET["admin_mode"] != "repository") {
166  return false;
167  }
168 
169  // these objects may exist due to test cases that didnt clear
170  // data properly
171  if ($a_type == "" || $a_type == "xxx") {
172  return false;
173  }
174 
175  $visible = $rbacsystem->checkAccess('visible', $a_ref_id);
176  if ($a_type == "rolf" && $a_ref_id != ROLE_FOLDER_ID) {
177  return false;
178  }
179 
180  return $visible;
181  }
$_GET["client_id"]
$a_type
Definition: workflow.php:92

◆ modifyChilds()

ilAdministrationExplorer::modifyChilds (   $a_parent_id,
  $a_objects 
)

modify children of parent ()

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

References $lng, $rbacsystem, and array.

187  {
188  $lng = $this->lng;
190 
191  if ($a_parent_id == SYSTEM_FOLDER_ID) {
192  $new_objects = array();
193  foreach ($a_objects as $object) {
194  $new_objects[$object["title"] . ":" . $object["child"]]
195  = $object;
196  }
197 
198  // add entry for switching to repository admin
199  // note: please see showChilds methods which prevents infinite look
200  if ($rbacsystem->checkAccess('write', SYSTEM_FOLDER_ID)) {
201  $new_objects[$lng->txt("repository_admin") . ":" . ROOT_FOLDER_ID] =
202  array(
203  "tree" => 1,
204  "child" => ROOT_FOLDER_ID,
205  "ref_id" => ROOT_FOLDER_ID,
206  "depth" => 3,
207  "type" => "root",
208  "title" => $lng->txt("repository_admin"),
209  "description" => $lng->txt("repository_admin_desc"),
210  "desc" => $lng->txt("repository_admin_desc"),
211  );
212  }
213  ksort($new_objects);
214 
215  return $new_objects;
216  }
217 
218  return $a_objects;
219  }
Create styles array
The data for the language used.

◆ showChilds()

ilAdministrationExplorer::showChilds (   $a_parent_id,
  $a_obj_id 
)

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

222  {
223 
224  // prevent infinite loop due to (root folder tree) node
225  // that is inserted under system admin folder
226  if ($a_parent_id == ROOT_FOLDER_ID) {
227  if ($this->rootfolder_shown == true) {
228  return false;
229  }
230  $this->rootfolder_shown = true;
231  }
232 
233  return true;
234  }

Field Documentation

◆ $ctrl

ilAdministrationExplorer::$ctrl

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

Referenced by buildLinkTarget().

◆ $lng

ilAdministrationExplorer::$lng
protected

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

Referenced by __construct(), formatHeader(), and modifyChilds().

◆ $obj_definition

ilAdministrationExplorer::$obj_definition
protected

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

Referenced by buildLinkTarget(), and formatHeader().

◆ $output

ilAdministrationExplorer::$output

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

◆ $rbacsystem

ilAdministrationExplorer::$rbacsystem
protected

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

Referenced by isClickable(), isVisible(), and modifyChilds().

◆ $root_id

ilAdministrationExplorer::$root_id

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


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