ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
 getNodeContent ($a_node)
 Get node content.
 getNodeIcon ($a_node)
 Get node icon.
 getNodeIconAlt ($a_node)
 Get node icon alt text.
 isNodeHighlighted ($a_node)
 Is node highlighted?
 getNodeHref ($a_node)
 Get href for 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.
 isNodeClickable ($a_node)
 Is node clickable?
- Public Member Functions inherited from ilTreeExplorerGUI
 __construct ($a_expl_id, $a_parent_obj, $a_parent_cmd, $a_tree)
 Constructor.
 getTree ()
 Get tree.
 setOrderField ($a_val, $a_numeric=false)
 Set order field.
 getOrderField ()
 Get order field.
 setTypeWhiteList ($a_val)
 Set type white list.
 getTypeWhiteList ()
 Get type white list.
 setTypeBlackList ($a_val)
 Set type black list.
 getTypeBlackList ()
 Get type black list.
 setPreloadChilds ($a_val)
 Set preload childs.
 getPreloadChilds ()
 Get preload childs.
 getSuccessorNode ($a_node_id, $a_type="")
 Get successor node (currently only(!) based on lft/rgt tree values)
 getNodeId ($a_node)
 Get id for node.
 getRootNode ()
 Get root node.
 setPathOpen ($a_id)
 Set node path to be opened.
 getHTML ()
 Get HTML.
- Public Member Functions inherited from ilExplorerBaseGUI
 __construct ($a_expl_id, $a_parent_obj, $a_parent_cmd)
 Constructor.
 nodeHasVisibleChilds ($a_node)
 Node has childs?
 getNodeTarget ($a_node)
 Get node target (frame) attribute.
 getNodeOnClick ($a_node)
 Get node onclick attribute.
 getId ()
 Get id of explorer element.
 setSkipRootNode ($a_val)
 Set skip root node.
 getSkipRootNode ()
 Get skip root node.
 setAjax ($a_val)
 Set ajax.
 getAjax ()
 Get ajax.
 setNodeOpen ($a_id)
 Set node to be opened (additional custom opened node, not standard expand behaviour)
 setSelectMode ($a_postvar, $a_multi=false)
 Set select mode (to deactivate, pass an empty string as postvar)
 setNodeSelected ($a_id)
 Set node to be opened (additional custom opened node, not standard expand behaviour)
 setOfflineMode ($a_val)
 Set offline mode.
 getOfflineMode ()
 Get offline mode.
 handleCommand ()
 Handle explorer internal command.
 getContainerId ()
 Get container id.
 openNode ()
 Open node.
 closeNode ()
 Close node.
 getNodeAsync ()
 Get node asynchronously.
 beforeRendering ()
 Before rendering.
 renderNode ($a_node, $tpl)
 Render node.
 renderChilds ($a_node_id, $tpl)
 Render childs.
 getDomNodeIdForNodeId ($a_node_id)
 Get DOM node id for node id.
 getNodeIdForDomNodeId ($a_dom_node_id)
 Get node id for dom node id.
 listItemStart ($tpl, $a_node)
 List item start.
 listItemEnd ($tpl)
 List item end.
 listStart ($tpl)
 List start.
 listEnd ($tpl)
 List end.

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

Additional Inherited Members

- Static Public Member Functions inherited from ilExplorerBaseGUI
static getLocalExplorerJsPath ()
 Get local path of explorer js.
static getLocalJsTreeJsPath ()
 Get local path of jsTree js.
static createHTMLExportDirs ($a_target_dir)
 Create html export directories.
- Protected Member Functions inherited from ilTreeExplorerGUI
 preloadChilds ()
 Preload childs.
- 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

ilAdministrationExplorerGUI::__construct (   $a_parent_obj,
  $a_parent_cmd 
)

Constructor.

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

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

{
global $tree, $ilSetting, $objDefinition;
$this->cur_ref_id = (int) $_GET["ref_id"];
$this->top_node_id = 0;
parent::__construct("adm_exp", $a_parent_obj, $a_parent_cmd, $tree);
$this->setSkipRootNode(false);
$this->setAjax(true);
$this->setOrderField("title");
$white = array();
foreach ($objDefinition->getSubObjectsRecursively("root") as $rtype)
{
if ($rtype["name"] != "itgr" && !$objDefinition->isSideBlock($rtype["name"]))
{
$white[] = $rtype["name"];
}
}
$this->setTypeWhiteList($white);
if ((int) $_GET["ref_id"] > 0)
{
$this->setPathOpen((int) $_GET["ref_id"]);
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilAdministrationExplorerGUI::getChildsOfNode (   $a_parent_node_id)

Get childs of node.

Parameters
@return

Reimplemented from ilTreeExplorerGUI.

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

{
global $rbacsystem;
if (!$rbacsystem->checkAccess("read", $a_parent_node_id))
{
return array();
}
return parent::getChildsOfNode($a_parent_node_id);
}
ilAdministrationExplorerGUI::getNodeContent (   $a_node)

Get node content.

Parameters
array
Returns

Reimplemented from ilExplorerBaseGUI.

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

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

{
global $lng;
$title = $a_node["title"];
if ($a_node["child"] == $this->getNodeId($this->getRootNode()))
{
if ($title == "ILIAS")
{
$title = $lng->txt("repository");
}
}
return $title;
}

+ Here is the call graph for this function:

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.

References $_GET, and $ilCtrl.

{
global $ilCtrl, $objDefinition;
$class_name = $objDefinition->getClassName($a_node["type"]);
$class = strtolower("ilObj".$class_name."GUI");
$ilCtrl->setParameterByClass($class, "ref_id", $a_node["child"]);
$link = $ilCtrl->getLinkTargetByClass($class, "view");
$ilCtrl->setParameterByClass($class, "ref_id", $_GET["ref_id"]);
return $link;
}
ilAdministrationExplorerGUI::getNodeIcon (   $a_node)

Get node icon.

Parameters
array
Returns

Reimplemented from ilExplorerBaseGUI.

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

References ilObject\_getIcon(), and ilObject\_lookupObjId().

{
$obj_id = ilObject::_lookupObjId($a_node["child"]);
return ilObject::_getIcon($obj_id, "tiny", $a_node["type"]);
}

+ Here is the call graph for this function:

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.

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

{
global $lng;
if ($a_node["child"] == $this->getNodeId($this->getRootNode()))
{
$title = $a_node["title"];
if ($title == "ILIAS")
{
$title = $lng->txt("repository");
}
return $lng->txt("icon")." ".$title;
}
return parent::getNodeIconAlt($a_node);
}

+ Here is the call graph for this function:

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.

References $ilUser, and ilTreeExplorerGUI\$tree.

{
global $rbacsystem,$tree,$ilDB,$ilUser,$ilAccess;
return $rbacsystem->checkAccess('read', $a_node["child"]);
}
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.

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

{
if ($a_node["child"] == $_GET["ref_id"] ||
($_GET["ref_id"] == "" && $a_node["child"] == $this->getNodeId($this->getRootNode())))
{
return true;
}
return false;
}

+ Here is the call graph for this function:

ilAdministrationExplorerGUI::isNodeVisible (   $a_node)

Is node visible.

Parameters
@return

Reimplemented from ilExplorerBaseGUI.

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

{
global $rbacsystem;
$visible = $rbacsystem->checkAccess('visible', $a_node["child"]);
if ($a_node["type"] == "rolf" && $a_node["child"] != ROLE_FOLDER_ID)
{
return false;
}
return $visible;
}
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.

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

{
global $objDefinition;
$parent_obj_id = ilObject::_lookupObjId($a_parent_node_id);
if ($parent_obj_id > 0)
{
$parent_type = ilObject::_lookupType($parent_obj_id);
}
else
{
$parent_type = "dummy";
$this->type_grps["dummy"] = array("root" => "dummy");
}
if (empty($this->type_grps[$parent_type]))
{
$this->type_grps[$parent_type] =
$objDefinition->getGroupedRepositoryObjectTypes($parent_type);
}
$group = array();
foreach ($a_childs as $child)
{
$g = $objDefinition->getGroupOfObj($child["type"]);
if ($g == "")
{
$g = $child["type"];
}
$group[$g][] = $child;
}
$childs = array();
foreach ($this->type_grps[$parent_type] as $t => $g)
{
if (is_array($group[$t]))
{
// do we have to sort this group??
include_once("./Services/Container/classes/class.ilContainer.php");
include_once("./Services/Container/classes/class.ilContainerSorting.php");
$sort = ilContainerSorting::_getInstance($parent_obj_id);
$group = $sort->sortItems($group);
// need extra session sorting here
if ($t == "sess")
{
}
foreach ($group[$t] as $k => $item)
{
$childs[] = $item;
}
}
}
return $childs;
}

+ Here is the call graph for this function:

Field Documentation

ilAdministrationExplorerGUI::$session_materials = array()
protected

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

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: