ILIAS
release_4-4 Revision
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
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
10
class
ilDidacticTemplateCopier
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'
;
55
foreach
(
ilDidacticTemplateActionFactory::getActionsByTemplateId
($this->
getTemplateId
()) as $action)
56
{
57
$action->setTemplateId($this->
getNewTemplateId
());
58
$new = clone $action;
59
$new->save();
60
}
61
62
63
}
64
}
65
?>
ilDidacticTemplateSetting
Definition:
class.ilDidacticTemplateSetting.php:10
ilDidacticTemplateCopier\__construct
__construct($a_tpl_id)
Constructor.
Definition:
class.ilDidacticTemplateCopier.php:19
ilDidacticTemplateCopier\$new_tpl_id
$new_tpl_id
Definition:
class.ilDidacticTemplateCopier.php:13
ilDidacticTemplateCopier\getNewTemplateId
getNewTemplateId()
Get new template id.
Definition:
class.ilDidacticTemplateCopier.php:37
ilDidacticTemplateCopier\getTemplateId
getTemplateId()
Get template id.
Definition:
class.ilDidacticTemplateCopier.php:28
ilDidacticTemplateCopier\$tpl_id
$tpl_id
Definition:
class.ilDidacticTemplateCopier.php:12
ilDidacticTemplateCopier
Copy a didactic template and all subitems.
Definition:
class.ilDidacticTemplateCopier.php:10
ilDidacticTemplateCopier\start
start()
Start copy.
Definition:
class.ilDidacticTemplateCopier.php:47
ilDidacticTemplateActionFactory\getActionsByTemplateId
static getActionsByTemplateId($a_tpl_id)
Get actions of one template.
Definition:
class.ilDidacticTemplateActionFactory.php:68
Services
DidacticTemplate
classes
class.ilDidacticTemplateCopier.php
Generated on Mon Dec 21 2020 19:01:14 for ILIAS by
1.8.13 (using
Doxyfile
)