5 require_once
"./Services/Object/classes/class.ilObject.php";
24 public function __construct($a_id = 0, $a_call_by_reference =
true)
28 $this->db = $DIC->database();
30 parent::__construct($a_id, $a_call_by_reference);
66 public function delete()
69 if (!parent::delete()) {
88 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
91 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
100 if ($source_obj->getType() ==
"skll") {
101 if (
$tree->isInTree($source_obj->getId())) {
102 $node_data =
$tree->getNodeData($source_obj->getId());
105 if ($movecopy ==
"move") {
106 $parent_id =
$tree->getParentId($source_obj->getId());
107 $tree->deleteTree($node_data);
111 if (!
$tree->isInTree($source_obj->getId())) {
115 } elseif ($as_subitem) {
118 $childs =
$tree->getChildsByType($parent,
array(
"skll",
"scat"));
119 if (count($childs) != 0) {
120 $target_pos = $childs[count($childs) - 1][
"obj_id"];
124 $parent = $target_parent;
128 $source_obj->getId(),
137 if ($source_obj->getType() ==
"scat") {
138 $source_node =
$tree->getNodeData($source_id);
139 $subnodes =
$tree->getSubtree($source_node);
142 foreach ($subnodes as $subnode) {
153 } elseif ($as_subitem) {
156 $childs =
$tree->getChilds($target_parent);
157 if (count($childs) != 0) {
158 $target_pos = $childs[count($childs) - 1][
"obj_id"];
163 if ($movecopy ==
"move") {
164 $tree->deleteTree($source_node);
167 if (!
$tree->isInTree($source_id)) {
168 $tree->insertNode($source_id, $target_parent, $target_pos);
171 if ($movecopy ==
"move") {
172 foreach ($subnodes as $node) {
173 if ($node[
"obj_id"] != $source_id) {
174 $tree->insertNode($node[
"obj_id"], $node[
"parent"]);
read()
read style folder data
executeDragDrop($source_id, $target_id, $first_child, $as_subitem=false, $movecopy="move")
Execute Drag Drop Action.
update()
update object data
static getInstance($a_id=0)
Skill management main application class.
Create styles array
The data for the language used.
update($pash, $contents, Config $config)
__construct($a_id=0, $a_call_by_reference=true)
Constructor public.