ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilDidacticTemplateCopier.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
11{
12 private $tpl_id = 0;
13 private $new_tpl_id = 0;
14
19 public function __construct($a_tpl_id)
20 {
21 $this->tpl_id = $a_tpl_id;
22 }
23
28 public function getTemplateId()
29 {
30 return $this->tpl_id;
31 }
32
37 public function getNewTemplateId()
38 {
39 return $this->new_tpl_id;
40 }
41
47 public function start()
48 {
49 $orig = new ilDidacticTemplateSetting($this->getTemplateId());
50 $copy = clone $orig;
51 $copy->save();
52 $this->new_tpl_id = $copy->getId();
53
54 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateActionFactory.php';
56 {
57 $action->setTemplateId($this->getNewTemplateId());
58 $new = clone $action;
59 $new->save();
60 }
61
62
63 }
64}
65?>
static getActionsByTemplateId($a_tpl_id)
Get actions of one template.
Copy a didactic template and all subitems.