ILIAS  release_8 Revision v8.24
class.ilSkillRoot.php
Go to the documentation of this file.
1<?php
2
26{
27 public function __construct(int $a_id = 0)
28 {
30 $this->setType("skrt");
31 }
32
33 public function delete(): void
34 {
35 $skrt_id = $this->getId();
36 $skill_tree = $this->skill_service->internal()->repo()->getTreeRepo()->getTreeForNodeId($skrt_id);
37 $childs = $skill_tree->getChildsByTypeFilter(
38 $skrt_id,
39 ["skll", "scat", "sktp", "sctp", "sktr"]
40 );
41 foreach ($childs as $node) {
42 switch ($node["type"]) {
43 case "skll":
44 $obj = new ilBasicSkill((int) $node["obj_id"]);
45 $obj->delete();
46 break;
47
48 case "scat":
49 $obj = new ilSkillCategory((int) $node["obj_id"]);
50 $obj->delete();
51 break;
52
53 case "sktp":
54 $obj = new ilBasicSkillTemplate((int) $node["obj_id"]);
55 $obj->delete();
56 break;
57
58 case "sctp":
59 $obj = new ilSkillTemplateCategory((int) $node["obj_id"]);
60 $obj->delete();
61 break;
62
63 case "sktr":
64 $obj = new ilSkillTemplateReference((int) $node["obj_id"]);
65 $obj->delete();
66 break;
67 }
68 }
69
70 parent::delete();
71 }
72}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(int $a_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setType(string $a_type)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc