ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPersonalSkillExplorerGUI Class Reference

Explorer for selecting a personal skill. More...

+ Inheritance diagram for ilPersonalSkillExplorerGUI:
+ Collaboration diagram for ilPersonalSkillExplorerGUI:

Public Member Functions

 __construct ($a_parent_obj, $a_parent_cmd, $a_select_gui, $a_select_cmd, $a_select_par="obj_id")
 Constructor.
 getHasSelectableNodes ()
 Get selectable nodes exist?
 buildSelectableTree ($a_node_id)
 Build selectable tree.
 getChildsOfNode ($a_parent_id)
 Get childs of node (selectable tree)
 getOriginalChildsOfNode ($a_parent_id)
 Get original childs of node (whole tree)
 getNodeHref ($a_node)
 Get href for node.
 getNodeContent ($a_node)
 Get node content.
 isNodeClickable ($a_node)
 Is clickable.
 getNodeIcon ($a_node)
 get image path (may be overwritten by derived classes)
- 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.
 getNodeIconAlt ($a_node)
 Get node icon alt attribute.
 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?
 sortChilds ($a_childs, $a_parent_node_id)
 Sort childs.
 getNodeTarget ($a_node)
 Get node target (frame) attribute.
 getNodeOnClick ($a_node)
 Get node onclick attribute.
 isNodeVisible ($a_node)
 Is node visible?
 isNodeHighlighted ($a_node)
 Is node highlighted?
 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 Member Functions

 setHasSelectableNodes ($a_val)
 Set selectable nodes exist?
- Protected Member Functions inherited from ilTreeExplorerGUI
 preloadChilds ()
 Preload childs.
- Protected Member Functions inherited from ilExplorerBaseGUI
 getNodeToggleOnClick ($a_node)
 Get onclick attribute for node toggling.
 getSelectOnClick ($a_node)
 Get onclick attribute for selecting radio/checkbox.

Protected Attributes

 $selectable = array()
 $selectable_child_nodes = array()
 $has_selectable_nodes = false
- 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.
- 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

Explorer for selecting a personal skill.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 15 of file class.ilPersonalSkillExplorerGUI.php.

Constructor & Destructor Documentation

ilPersonalSkillExplorerGUI::__construct (   $a_parent_obj,
  $a_parent_cmd,
  $a_select_gui,
  $a_select_cmd,
  $a_select_par = "obj_id" 
)

Constructor.

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

References $n, buildSelectableTree(), and ilExplorerBaseGUI\setSkipRootNode().

{
$this->select_gui = (is_object($a_select_gui))
? strtolower(get_class($a_select_gui))
: $a_select_gui;
$this->select_cmd = $a_select_cmd;
$this->select_par = $a_select_par;
include_once("./Services/Skill/classes/class.ilSkillTree.php");
$this->tree = new ilSkillTree();
$this->root_id = $this->tree->readRootId();
parent::__construct("pskill_sel", $a_parent_obj, $a_parent_cmd, $this->tree);
$this->setSkipRootNode(true);
$this->all_nodes = $this->tree->getSubTree($this->tree->getNodeData($this->root_id));
foreach ($this->all_nodes as $n)
{
$this->node[$n["child"]] = $n;
$this->child_nodes[$n["parent"]][] = $n;
$this->parent[$n["child"]] = $n["parent"];
//echo "-$k-"; var_dump($n);
}
// $this->setTypeWhiteList(array("skrt", "skll", "scat", "sktr"));
$this->buildSelectableTree($this->tree->readRootId());
}

+ Here is the call graph for this function:

Member Function Documentation

ilPersonalSkillExplorerGUI::buildSelectableTree (   $a_node_id)

Build selectable tree.

Parameters
int$a_node_idtree id

Definition at line 80 of file class.ilPersonalSkillExplorerGUI.php.

References $n, ilSkillTreeNode\_lookupSelfEvaluation(), ilSkillTreeNode\_lookupStatus(), getOriginalChildsOfNode(), setHasSelectableNodes(), ilSkillTreeNode\STATUS_DRAFT, and ilSkillTreeNode\STATUS_OUTDATED.

Referenced by __construct().

{
//echo "<br>-$a_node_id-";
{
return;
}
{
$this->selectable[$a_node_id] = true;
$cid = $a_node_id;
//$this->selectable[$this->parent[$a_node_id]] = true;
while(isset($this->parent[$cid]))
{
$this->selectable[$this->parent[$cid]] = true;
$cid = $this->parent[$cid];
}
}
foreach ($this->getOriginalChildsOfNode($a_node_id) as $n)
{
//echo "+".$n["child"]."+";
$this->buildSelectableTree($n["child"]);
}
if ($this->selectable[$a_node_id])
{
$this->setHasSelectableNodes(true);
$this->selectable_child_nodes[$this->node[$a_node_id]["parent"]][] =
$this->node[$a_node_id];
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPersonalSkillExplorerGUI::getChildsOfNode (   $a_parent_id)

Get childs of node (selectable tree)

Parameters
int$a_parent_idparent id
Returns
array childs

Reimplemented from ilTreeExplorerGUI.

Definition at line 118 of file class.ilPersonalSkillExplorerGUI.php.

References ilTreeExplorerGUI\$childs, and ilUtil\sortArray().

{
if (is_array($this->selectable_child_nodes[$a_parent_id]))
{
$childs = $this->selectable_child_nodes[$a_parent_id];
$childs = ilUtil::sortArray($childs, "order_nr", "asc", true);
return $childs;
}
return array();
}

+ Here is the call graph for this function:

ilPersonalSkillExplorerGUI::getHasSelectableNodes ( )

Get selectable nodes exist?

Returns
bool selectable nodes exist

Definition at line 70 of file class.ilPersonalSkillExplorerGUI.php.

References $has_selectable_nodes.

ilPersonalSkillExplorerGUI::getNodeContent (   $a_node)

Get node content.

Parameters
array
Returns

Reimplemented from ilExplorerBaseGUI.

Definition at line 169 of file class.ilPersonalSkillExplorerGUI.php.

References $lng.

{
global $lng;
// title
$title = $a_node["title"];
return $title;
}
ilPersonalSkillExplorerGUI::getNodeHref (   $a_node)

Get href for node.

Parameters
mixed$a_nodenode object/array
Returns
string href attribute

Reimplemented from ilExplorerBaseGUI.

Definition at line 150 of file class.ilPersonalSkillExplorerGUI.php.

References $ilCtrl, and $ret.

{
global $ilCtrl;
$skill_id = $a_node["child"];
$ilCtrl->setParameterByClass($this->select_gui, $this->select_par, $skill_id);
$ret = $ilCtrl->getLinkTargetByClass($this->select_gui, $this->select_cmd);
$ilCtrl->setParameterByClass($this->select_gui, $this->select_par, "");
return $ret;
}
ilPersonalSkillExplorerGUI::getNodeIcon (   $a_node)

get image path (may be overwritten by derived classes)

Reimplemented from ilExplorerBaseGUI.

Definition at line 197 of file class.ilPersonalSkillExplorerGUI.php.

References $t, and ilUtil\getImagePath().

{
$t = $a_node["type"];
if (in_array($t, array("sktr")))
{
return ilUtil::getImagePath("icon_skll_s.png");
}
return ilUtil::getImagePath("icon_".$t."_s.png");
}

+ Here is the call graph for this function:

ilPersonalSkillExplorerGUI::getOriginalChildsOfNode (   $a_parent_id)

Get original childs of node (whole tree)

Parameters
int$a_parent_idparent id
Returns
array childs

Definition at line 135 of file class.ilPersonalSkillExplorerGUI.php.

Referenced by buildSelectableTree().

{
if (is_array($this->child_nodes[$a_parent_id]))
{
return $this->child_nodes[$a_parent_id];
}
return array();
}

+ Here is the caller graph for this function:

ilPersonalSkillExplorerGUI::isNodeClickable (   $a_node)

Is clickable.

Parameters
@return

Reimplemented from ilExplorerBaseGUI.

Definition at line 185 of file class.ilPersonalSkillExplorerGUI.php.

References ilSkillTreeNode\_lookupSelfEvaluation().

{
{
return false;
}
return true;
}

+ Here is the call graph for this function:

ilPersonalSkillExplorerGUI::setHasSelectableNodes (   $a_val)
protected

Set selectable nodes exist?

Parameters
bool$a_valselectable nodes exist

Definition at line 60 of file class.ilPersonalSkillExplorerGUI.php.

Referenced by buildSelectableTree().

{
$this->has_selectable_nodes = $a_val;
}

+ Here is the caller graph for this function:

Field Documentation

ilPersonalSkillExplorerGUI::$has_selectable_nodes = false
protected

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

Referenced by getHasSelectableNodes().

ilPersonalSkillExplorerGUI::$selectable = array()
protected

Definition at line 17 of file class.ilPersonalSkillExplorerGUI.php.

ilPersonalSkillExplorerGUI::$selectable_child_nodes = array()
protected

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


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