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.ilPageEditorSettings.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
class
ilPageEditorSettings
12
{
13
// settings groups. each group contains one or multiple
14
// page parent types
15
protected
static
$option_groups
= array(
16
"lm"
=> array(
"lm"
,
"dbk"
),
17
"wiki"
=> array(
"wpg"
),
18
"scorm"
=> array(
"sahs"
),
19
"glo"
=> array(
"gdf"
),
20
"test"
=> array(
"qpl"
),
21
"rep"
=> array(
"root"
,
"cat"
,
"grp"
,
"crs"
,
"fold"
)
22
);
23
27
static
function
getGroups
()
28
{
29
return
self::$option_groups;
30
}
31
35
static
function
writeSetting
($a_grp, $a_name, $a_value)
36
{
37
global $ilDB;
38
39
$ilDB->manipulate(
"DELETE FROM page_editor_settings WHERE "
.
40
"settings_grp = "
.$ilDB->quote($a_grp,
"text"
).
41
" AND name = "
.$ilDB->quote($a_name,
"text"
)
42
);
43
44
$ilDB->manipulate(
"INSERT INTO page_editor_settings "
.
45
"(settings_grp, name, value) VALUES ("
.
46
$ilDB->quote($a_grp,
"text"
).
","
.
47
$ilDB->quote($a_name,
"text"
).
","
.
48
$ilDB->quote($a_value,
"text"
).
49
")"
);
50
}
51
55
static
function
lookupSetting
($a_grp, $a_name, $a_default =
false
)
56
{
57
global $ilDB;
58
59
$set = $ilDB->query(
"SELECT value FROM page_editor_settings "
.
60
" WHERE settings_grp = "
.$ilDB->quote($a_grp,
"text"
).
61
" AND name = "
.$ilDB->quote($a_name,
"text"
)
62
);
63
if
($rec = $ilDB->fetchAssoc($set))
64
{
65
return
$rec[
"value"
];
66
}
67
68
return
$a_default;
69
}
70
74
static
function
lookupSettingByParentType
($a_par_type, $a_name, $a_default =
false
)
75
{
76
foreach
(self::$option_groups as $g => $types)
77
{
78
if
(in_array($a_par_type, $types))
79
{
80
$grp = $g;
81
}
82
}
83
84
if
($grp !=
""
)
85
{
86
return
ilPageEditorSettings::lookupSetting
($grp, $a_name, $a_default);
87
}
88
89
return
$a_default;
90
}
91
92
}
93
?>
ilPageEditorSettings\$option_groups
static $option_groups
Definition:
class.ilPageEditorSettings.php:15
ilPageEditorSettings\lookupSetting
static lookupSetting($a_grp, $a_name, $a_default=false)
Lookup setting.
Definition:
class.ilPageEditorSettings.php:55
ilPageEditorSettings\getGroups
static getGroups()
Get all settings groups.
Definition:
class.ilPageEditorSettings.php:27
ilPageEditorSettings\writeSetting
static writeSetting($a_grp, $a_name, $a_value)
Write Setting.
Definition:
class.ilPageEditorSettings.php:35
ilPageEditorSettings
Page editor settings.
Definition:
class.ilPageEditorSettings.php:11
ilPageEditorSettings\lookupSettingByParentType
static lookupSettingByParentType($a_par_type, $a_name, $a_default=false)
Lookup setting by parent type.
Definition:
class.ilPageEditorSettings.php:74
Services
COPage
classes
class.ilPageEditorSettings.php
Generated on Mon Dec 21 2020 19:01:12 for ILIAS by
1.8.13 (using
Doxyfile
)