ILIAS
Release_4_3_x_branch Revision 61807
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
ILIAS
Todo List
Deprecated List
Modules
Namespaces
Data Structures
Files
File List
cron
include
Modules
Services
AccessControl
Accessibility
Accordion
Administration
AdvancedEditing
AdvancedMetaData
AuthApache
Authentication
AuthShibboleth
Block
Booking
Bookmarks
Cache
Calendar
Captcha
CAS
Certificate
Chart
Clipboard
Component
Contact
Container
ContainerReference
Context
COPage
CopyWizard
Database
DataSet
DidacticTemplate
classes
class.ilDidacticTemplateAction.php
class.ilDidacticTemplateActionFactory.php
class.ilDidacticTemplateBlockRoleAction.php
class.ilDidacticTemplateCopier.php
class.ilDidacticTemplateExcludeFilterPattern.php
class.ilDidacticTemplateFilterPattern.php
class.ilDidacticTemplateFilterPatternFactory.php
class.ilDidacticTemplateGUI.php
class.ilDidacticTemplateImport.php
class.ilDidacticTemplateIncludeFilterPattern.php
class.ilDidacticTemplateLocalPolicyAction.php
class.ilDidacticTemplateLocalRoleAction.php
class.ilDidacticTemplateObjSettings.php
class.ilDidacticTemplateSetting.php
class.ilDidacticTemplateSettings.php
class.ilDidacticTemplateSettingsGUI.php
class.ilDidacticTemplateSettingsTableGUI.php
class.ilDidacticTemplateXmlWriter.php
class.ilObjObjectTemplateAdministration.php
class.ilObjObjectTemplateAdministrationAccess.php
class.ilObjObjectTemplateAdministrationGUI.php
exceptions
Dom
EventHandling
Excel
Exceptions
Export
Feedback
Feeds
FileSystem
Form
Frameset
GoogleMaps
Help
History
Html
Http
Imprint
InfoScreen
Init
jQuery
JSON
Language
LDAP
License
Link
LinkChecker
LoadTest
Locator
Logging
Mail
MainMenu
Math
MediaObjects
Membership
MetaData
Migration
Navigation
News
Notes
Notification
Notifications
Object
OpenId
OrgUnit
Payment
PEAR
PermanentLink
PersonalDesktop
PersonalWorkspace
PHPUnit
Portfolio
PrivacySecurity
QTI
Radius
Rating
Registration
Repository
RTE
Search
Skill
SOAPAuth
Style
Survey
Table
Tagging
Taxonomy
Tracking
Transformation
Tree
UIComponent
UICore
User
Utilities
Verification
VirusScanner
WebAccessChecker
WebDAV
WebServices
Workflow
XHTMLPage
XHTMLValidator
Xml
YUI
setup
sso
webservice
calendar.php
confirmReg.php
error.php
feed.php
goto.php
ilias.php
index.php
login.php
logout.php
payment.php
privfeed.php
pwassist.php
register.php
rootindex.php
sessioncheck.php
shib_login.php
shib_logout.php
start.php
studip_referrer.php
webdav.php
Globals
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilDidacticTemplateSettings.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.ilDidacticTemplateSetting.php'
;
5
12
class
ilDidacticTemplateSettings
13
{
14
private
static
$instance
= null;
15
private
static
$instances
= null;
16
17
18
private
$templates
= array();
19
private
$obj_type
=
''
;
20
25
private
function
__construct
($a_obj_type =
''
)
26
{
27
$this->obj_type = $a_obj_type;
28
$this->
read
();
29
}
30
35
public
static
function
getInstance
()
36
{
37
if
(self::$instance)
38
{
39
return
self::$instance
;
40
}
41
return
self::$instance =
new
ilDidacticTemplateSettings
();
42
}
43
49
public
static
function
getInstanceByObjectType
($a_obj_type)
50
{
51
if
(self::$instances[$a_obj_type])
52
{
53
return
self::$instances[$a_obj_type];
54
}
55
return
self::$instances[$a_obj_type] =
new
ilDidacticTemplateSettings
($a_obj_type);
56
}
57
62
public
function
getTemplates
()
63
{
64
return
(array)
$this->templates
;
65
}
66
71
public
function
getObjectType
()
72
{
73
return
$this->obj_type
;
74
}
75
79
public
function
readInactive
()
80
{
81
82
global $ilDB;
83
84
$query
=
'SELECT dtpl.id FROM didactic_tpl_settings dtpl '
;
85
86
if
($this->
getObjectType
())
87
{
88
$query
.=
'JOIN didactic_tpl_sa tplsa ON dtpl.id = tplsa.id '
;
89
}
90
$query
.=
'WHERE enabled = '
.$ilDB->quote(0,
'integer'
).
' '
;
91
92
if
($this->
getObjectType
())
93
{
94
$query
.=
'AND obj_type = '
.$ilDB->quote($this->
getObjectType
(),
'text'
);
95
}
96
97
$res
= $ilDB->query(
$query
);
98
while
(
$row
=
$res
->fetchRow(
DB_FETCHMODE_OBJECT
))
99
{
100
$this->templates[
$row
->id] =
new
ilDidacticTemplateSetting
(
$row
->id);
101
}
102
return
true
;
103
}
104
110
protected
function
read
()
111
{
112
global $ilDB;
113
114
$query
=
'SELECT dtpl.id FROM didactic_tpl_settings dtpl '
;
115
116
if
($this->
getObjectType
())
117
{
118
$query
.=
'JOIN didactic_tpl_sa tplsa ON dtpl.id = tplsa.id '
;
119
}
120
$query
.=
'WHERE enabled = '
.$ilDB->quote(1,
'integer'
).
' '
;
121
122
if
($this->
getObjectType
())
123
{
124
$query
.=
'AND obj_type = '
.$ilDB->quote($this->
getObjectType
(),
'text'
);
125
}
126
127
$res
= $ilDB->query(
$query
);
128
while
(
$row
=
$res
->fetchRow(
DB_FETCHMODE_OBJECT
))
129
{
130
$this->templates[
$row
->id] =
new
ilDidacticTemplateSetting
(
$row
->id);
131
}
132
return
true
;
133
}
134
}
135
136
?>
Services
DidacticTemplate
classes
class.ilDidacticTemplateSettings.php
Generated on Sat Apr 23 2016 19:02:14 for ILIAS by
1.8.1.2 (using
Doxyfile
)