4 include_once(
"./Services/UIComponent/Explorer2/classes/class.ilTreeExplorerGUI.php");
5 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
34 public function __construct($a_parent_obj, $a_parent_cmd, $a_select_gui, $a_select_cmd, $a_select_par =
"obj_id")
38 $this->ctrl = $DIC->ctrl();
39 $this->lng = $DIC->language();
41 $this->select_gui = (is_object($a_select_gui))
42 ? strtolower(get_class($a_select_gui))
44 $this->select_cmd = $a_select_cmd;
45 $this->select_par = $a_select_par;
48 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
50 $this->root_id = $this->tree->readRootId();
52 parent::__construct(
"pskill_sel", $a_parent_obj, $a_parent_cmd, $this->tree);
55 $this->all_nodes = $this->tree->getSubTree($this->tree->getNodeData($this->root_id));
56 foreach ($this->all_nodes as
$n) {
57 $this->node[$n[
"child"]] =
$n;
58 $this->child_nodes[$n[
"parent"]][] =
$n;
59 $this->parent[$n[
"child"]] = $n[
"parent"];
75 $this->has_selectable_nodes = $a_val;
101 $this->selectable[$a_node_id] =
true;
104 while (isset($this->parent[$cid])) {
105 $this->selectable[$this->parent[$cid]] =
true;
106 $cid = $this->parent[$cid];
113 if ($this->selectable[$a_node_id]) {
115 $this->selectable_child_nodes[$this->node[$a_node_id][
"parent"]][] =
116 $this->node[$a_node_id];
128 if (is_array($this->selectable_child_nodes[$a_parent_id])) {
129 $childs = $this->selectable_child_nodes[$a_parent_id];
144 if (is_array($this->child_nodes[$a_parent_id])) {
145 return $this->child_nodes[$a_parent_id];
160 $skill_id = $a_node[
"child"];
162 $ilCtrl->setParameterByClass($this->select_gui, $this->select_par, $skill_id);
163 $ret =
$ilCtrl->getLinkTargetByClass($this->select_gui, $this->select_cmd);
164 $ilCtrl->setParameterByClass($this->select_gui, $this->select_par,
"");
180 $title = $a_node[
"title"];
204 $t = $a_node[
"type"];
205 if (in_array(
$t,
array(
"sktr"))) {
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
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.
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.