ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
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
case
ilDidacticTemplateAction::TYPE_LOCAL_POLICY
:
23
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateLocalPolicyAction.php'
;
24
return
new
ilDidacticTemplateLocalPolicyAction
();
25
26
case
ilDidacticTemplateAction::TYPE_LOCAL_ROLE
:
27
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateLocalRoleAction.php'
;
28
return
new
ilDidacticTemplateLocalRoleAction
();
29
30
case
ilDidacticTemplateAction::TYPE_BLOCK_ROLE
:
31
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateBlockRoleAction.php'
;
32
return
new
ilDidacticTemplateBlockRoleAction
();
33
}
34
}
35
36
43
public
static
function
factoryByTypeAndId
($a_action_id, $a_action_type)
44
{
45
switch
($a_action_type) {
46
case
ilDidacticTemplateAction::TYPE_LOCAL_POLICY
:
47
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateLocalPolicyAction.php'
;
48
return
new
ilDidacticTemplateLocalPolicyAction
($a_action_id);
49
50
case
ilDidacticTemplateAction::TYPE_LOCAL_ROLE
:
51
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateLocalRoleAction.php'
;
52
return
new
ilDidacticTemplateLocalRoleAction
($a_action_id);
53
54
case
ilDidacticTemplateAction::TYPE_BLOCK_ROLE
:
55
include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateBlockRoleAction.php'
;
56
return
new
ilDidacticTemplateBlockRoleAction
($a_action_id);
57
}
58
}
59
60
65
public
static
function
getActionsByTemplateId
($a_tpl_id)
66
{
67
global
$DIC
;
68
69
$ilDB
= $DIC[
'ilDB'
];
70
71
$query
=
'SELECT id, type_id FROM didactic_tpl_a '
.
72
'WHERE tpl_id = '
.
$ilDB
->quote($a_tpl_id,
'integer'
);
73
$res
=
$ilDB
->query(
$query
);
74
75
$actions = array();
76
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
77
$actions[] = self::factoryByTypeAndId(
$row
->id,
$row
->type_id);
78
}
79
return
(array) $actions;
80
}
81
}
ilDidacticTemplateAction\TYPE_LOCAL_ROLE
const TYPE_LOCAL_ROLE
Definition:
class.ilDidacticTemplateAction.php:13
ilDidacticTemplateActionFactory\factoryByTypeAndId
static factoryByTypeAndId($a_action_id, $a_action_type)
Get instance by id and type.
Definition:
class.ilDidacticTemplateActionFactory.php:43
ilDidacticTemplateAction\TYPE_BLOCK_ROLE
const TYPE_BLOCK_ROLE
Definition:
class.ilDidacticTemplateAction.php:14
ilDidacticTemplateBlockRoleAction
Description of ilDidacticTemplateBlockRoleAction.
Definition:
class.ilDidacticTemplateBlockRoleAction.php:12
$DIC
global $DIC
Definition:
saml.php:7
ilDidacticTemplateLocalPolicyAction
Description of class.
Definition:
class.ilDidacticTemplateLocalPolicyAction.php:12
ilDidacticTemplateActionFactory
Factory for didactic template actions.
Definition:
class.ilDidacticTemplateActionFactory.php:12
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
$query
$query
Definition:
proxy_ylocal.php:13
$row
$row
Definition:
migrateto20.php:360
ilDidacticTemplateLocalRoleAction
represents a creation of local roles action
Definition:
class.ilDidacticTemplateLocalRoleAction.php:12
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
ilDidacticTemplateAction\TYPE_LOCAL_POLICY
const TYPE_LOCAL_POLICY
Definition:
class.ilDidacticTemplateAction.php:12
ilDidacticTemplateActionFactory\getActionsByTemplateId
static getActionsByTemplateId($a_tpl_id)
Get actions of one template.
Definition:
class.ilDidacticTemplateActionFactory.php:65
ilDidacticTemplateActionFactory\factoryByType
static factoryByType($a_action_type)
Get action class by type.
Definition:
class.ilDidacticTemplateActionFactory.php:19
Services
DidacticTemplate
classes
class.ilDidacticTemplateActionFactory.php
Generated on Thu Jan 16 2025 19:02:21 for ILIAS by
1.8.13 (using
Doxyfile
)