ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilBasicSkillTemplate.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Skill/classes/class.ilBasicSkill.php");
6
16{
17 public $id;
18
23 public function __construct($a_id = 0)
24 {
25 parent::__construct($a_id);
26 $this->setType("sktp");
27 }
28
32 public function copy()
33 {
34 $skill = new ilBasicSkillTemplate();
35 $skill->setTitle($this->getTitle());
36 $skill->setType($this->getType());
37 $skill->setOrderNr($this->getOrderNr());
38 $skill->create();
39
40 $levels = $this->getLevelData();
41 if (sizeof($levels)) {
42 foreach ($levels as $item) {
43 $skill->addLevel($item["title"], $item["description"]);
44 }
45 }
46 $skill->update();
47
48 return $skill;
49 }
50}
An exception for terminatinating execution or to throw for unit testing.
copy()
Copy basic skill template.
__construct($a_id=0)
Constructor @access public.
getLevelData($a_id=0)
Get level data.
setType($a_type)
Set type.
getOrderNr()
Get order nr.