ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilSkillCategory.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2020 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
12 public $id;
13
18 public function __construct($a_id = 0)
19 {
21 $this->setType("scat");
22 }
23
27 public function read()
28 {
29 parent::read();
30 }
31
36 public function create()
37 {
38 parent::create();
39 }
40
44 public function delete()
45 {
46 $scat_id = $this->getId();
47 $childs = $this->skill_tree->getChildsByTypeFilter(
48 $scat_id,
49 ["skll", "scat", "sktr"]
50 );
51 foreach ($childs as $node) {
52 switch ($node["type"]) {
53 case "skll":
54 $obj = new ilBasicSkill((int) $node["obj_id"]);
55 $obj->delete();
56 break;
57
58 case "scat":
59 $obj = new ilSkillCategory((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
76 public function copy()
77 {
78 $scat = new ilSkillCategory();
79 $scat->setTitle($this->getTitle());
80 $scat->setDescription($this->getDescription());
81 $scat->setType($this->getType());
82 $scat->setSelfEvaluation($this->getSelfEvaluation());
83 $scat->setOrderNr($this->getOrderNr());
84 $scat->create();
85
86 return $scat;
87 }
88}
An exception for terminatinating execution or to throw for unit testing.
copy()
Copy skill category.
__construct($a_id=0)
Constructor @access public.
read()
Read data from database.
A node in the skill tree.
getDescription()
Get description.
setType($a_type)
Set type.
getOrderNr()
Get order nr.
getSelfEvaluation()
Get self evaluation.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc