ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 {
26 $this->setType("sktp");
27 }
28
32 public function copy()
33 {
34 $skill = new ilBasicSkillTemplate();
35 $skill->setTitle($this->getTitle());
36 $skill->setDescription($this->getDescription());
37 $skill->setType($this->getType());
38 $skill->setOrderNr($this->getOrderNr());
39 $skill->create();
40
41 $levels = $this->getLevelData();
42 if (sizeof($levels)) {
43 foreach ($levels as $item) {
44 $skill->addLevel($item["title"], $item["description"]);
45 }
46 }
47 $skill->update();
48
49 return $skill;
50 }
51}
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.
getDescription()
Get description.
setType($a_type)
Set type.
getOrderNr()
Get order nr.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc