4 include_once(
"./Services/UIComponent/Explorer2/classes/class.ilTreeExplorerGUI.php");
5 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
24 public function __construct($a_parent_obj, $a_parent_cmd, $a_select_gui, $a_select_cmd, $a_select_par =
"obj_id")
27 $this->select_gui = (is_object($a_select_gui))
28 ? strtolower(get_class($a_select_gui))
30 $this->select_cmd = $a_select_cmd;
31 $this->select_par = $a_select_par;
34 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
36 $this->root_id = $this->tree->readRootId();
38 parent::__construct(
"pskill_sel", $a_parent_obj, $a_parent_cmd, $this->tree);
41 $this->all_nodes = $this->tree->getSubTree($this->tree->getNodeData($this->root_id));
42 foreach ($this->all_nodes as
$n)
44 $this->node[$n[
"child"]] =
$n;
45 $this->child_nodes[$n[
"parent"]][] =
$n;
46 $this->
parent[$n[
"child"]] = $n[
"parent"];
62 $this->has_selectable_nodes = $a_val;
90 $this->selectable[$a_node_id] =
true;
93 while(isset($this->
parent[$cid]))
95 $this->selectable[$this->
parent[$cid]] =
true;
96 $cid = $this->parent[$cid];
104 if ($this->selectable[$a_node_id])
107 $this->selectable_child_nodes[$this->node[$a_node_id][
"parent"]][] =
108 $this->node[$a_node_id];
120 if (is_array($this->selectable_child_nodes[$a_parent_id]))
122 $childs = $this->selectable_child_nodes[$a_parent_id];
137 if (is_array($this->child_nodes[$a_parent_id]))
139 return $this->child_nodes[$a_parent_id];
154 $skill_id = $a_node[
"child"];
156 $ilCtrl->setParameterByClass($this->select_gui, $this->select_par, $skill_id);
157 $ret = $ilCtrl->getLinkTargetByClass($this->select_gui, $this->select_cmd);
158 $ilCtrl->setParameterByClass($this->select_gui, $this->select_par,
"");
174 $title = $a_node[
"title"];
199 $t = $a_node[
"type"];
200 if (in_array(
$t,
array(
"sktr")))
getHasSelectableNodes()
Get selectable nodes exist?
static _lookupSelfEvaluation($a_obj_id)
Lookup self evaluation.
setSkipRootNode($a_val)
Set skip root node.
Explorer for selecting a personal skill.
getNodeHref($a_node)
Get href for node.
__construct($a_parent_obj, $a_parent_cmd, $a_select_gui, $a_select_cmd, $a_select_par="obj_id")
Constructor.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
setHasSelectableNodes($a_val)
Set selectable nodes exist?
getChildsOfNode($a_parent_id)
Get childs of node (selectable tree)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getNodeIcon($a_node)
get image path (may be overwritten by derived classes)
getNodeContent($a_node)
Get node content.
isNodeClickable($a_node)
Is clickable.
Create styles array
The data for the language used.
Explorer class that works on tree objects (Services/Tree)
static _lookupStatus($a_obj_id)
Lookup Status.
getOriginalChildsOfNode($a_parent_id)
Get original childs of node (whole tree)
buildSelectableTree($a_node_id)
Build selectable tree.