ILIAS
release_4-3 Revision
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilDidacticTemplateActionFactory.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateAction.php'
;
5
12
class
ilDidacticTemplateActionFactory
13
{
19
public
static
function
factoryByType
($a_action_type)
20
{
21
switch
($a_action_type)
22
{
23
case
ilDidacticTemplateAction::TYPE_LOCAL_POLICY
:
24
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateLocalPolicyAction.php'
;
25
return
new
ilDidacticTemplateLocalPolicyAction
();
26
27
case
ilDidacticTemplateAction::TYPE_LOCAL_ROLE
:
28
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateLocalRoleAction.php'
;
29
return
new
ilDidacticTemplateLocalRoleAction
();
30
31
case
ilDidacticTemplateAction::TYPE_BLOCK_ROLE
:
32
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateBlockRoleAction.php'
;
33
return
new
ilDidacticTemplateBlockRoleAction
();
34
}
35
}
36
37
44
public
static
function
factoryByTypeAndId
($a_action_id,$a_action_type)
45
{
46
switch
($a_action_type)
47
{
48
case
ilDidacticTemplateAction::TYPE_LOCAL_POLICY
:
49
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateLocalPolicyAction.php'
;
50
return
new
ilDidacticTemplateLocalPolicyAction
($a_action_id);
51
52
case
ilDidacticTemplateAction::TYPE_LOCAL_ROLE
:
53
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateLocalRoleAction.php'
;
54
return
new
ilDidacticTemplateLocalRoleAction
($a_action_id);
55
56
case
ilDidacticTemplateAction::TYPE_BLOCK_ROLE
:
57
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateBlockRoleAction.php'
;
58
return
new
ilDidacticTemplateBlockRoleAction
($a_action_id);
59
}
60
61
}
62
63
68
public
static
function
getActionsByTemplateId
($a_tpl_id)
69
{
70
global $ilDB;
71
72
$query
=
'SELECT id, type_id FROM didactic_tpl_a '
.
73
'WHERE tpl_id = '
.$ilDB->quote($a_tpl_id,
'integer'
);
74
$res
= $ilDB->query(
$query
);
75
76
$actions = array();
77
while
(
$row
=
$res
->fetchRow(
DB_FETCHMODE_OBJECT
))
78
{
79
$actions[] =
self::factoryByTypeAndId
(
$row
->id,
$row
->type_id);
80
}
81
return
(array) $actions;
82
}
83
84
}
85
?>
Services
DidacticTemplate
classes
class.ilDidacticTemplateActionFactory.php
Generated on Sat Apr 30 2016 19:00:58 for ILIAS by
1.8.1.2 (using
Doxyfile
)