ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilPageEditorSettings Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilPageEditorSettings:

Static Public Member Functions

static getGroups ()
 Get all settings groups. More...
 
static writeSetting (string $a_grp, string $a_name, string $a_value)
 Write Setting. More...
 
static lookupSetting (string $a_grp, string $a_name, string $a_default='0')
 Lookup setting. More...
 
static lookupSettingByParentType (string $a_par_type, string $a_name, string $a_default='0')
 Lookup setting by parent type. More...
 

Static Protected Attributes

static array $option_groups
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Page editor settings

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilPageEditorSettings.php.

Member Function Documentation

◆ getGroups()

static ilPageEditorSettings::getGroups ( )
static

Get all settings groups.

Definition at line 41 of file class.ilPageEditorSettings.php.

41 : array
42 {
44 }

References $option_groups.

Referenced by ilObjAdvancedEditingGUI\addPageEditorSettingsSubtabs(), and ilObjAdvancedEditingGUI\showPageEditorSettingsObject().

+ Here is the caller graph for this function:

◆ lookupSetting()

static ilPageEditorSettings::lookupSetting ( string  $a_grp,
string  $a_name,
string  $a_default = '0' 
)
static

Lookup setting.

Definition at line 75 of file class.ilPageEditorSettings.php.

79 : string {
80 global $DIC;
81
82 $ilDB = $DIC->database();
83
84 $set = $ilDB->query(
85 "SELECT value FROM page_editor_settings " .
86 " WHERE settings_grp = " . $ilDB->quote($a_grp, "text") .
87 " AND name = " . $ilDB->quote($a_name, "text")
88 );
89 if ($rec = $ilDB->fetchAssoc($set)) {
90 return (string) $rec["value"];
91 }
92
93 return $a_default;
94 }
global $DIC
Definition: shib_login.php:26

Referenced by ilObjAdvancedEditingGUI\initPageEditorForm().

+ Here is the caller graph for this function:

◆ lookupSettingByParentType()

static ilPageEditorSettings::lookupSettingByParentType ( string  $a_par_type,
string  $a_name,
string  $a_default = '0' 
)
static

Lookup setting by parent type.

Definition at line 99 of file class.ilPageEditorSettings.php.

103 : string {
104 $grp = "";
105 foreach (self::$option_groups as $g => $types) {
106 if (in_array($a_par_type, $types)) {
107 $grp = $g;
108 }
109 }
110
111 if ($grp != "") {
112 return ilPageEditorSettings::lookupSetting($grp, $a_name, $a_default);
113 }
114
115 return $a_default;
116 }
static lookupSetting(string $a_grp, string $a_name, string $a_default='0')
Lookup setting.

◆ writeSetting()

static ilPageEditorSettings::writeSetting ( string  $a_grp,
string  $a_name,
string  $a_value 
)
static

Write Setting.

Definition at line 49 of file class.ilPageEditorSettings.php.

53 : void {
54 global $DIC;
55
56 $ilDB = $DIC->database();
57
58 $ilDB->manipulate(
59 "DELETE FROM page_editor_settings WHERE " .
60 "settings_grp = " . $ilDB->quote($a_grp, "text") .
61 " AND name = " . $ilDB->quote($a_name, "text")
62 );
63
64 $ilDB->manipulate("INSERT INTO page_editor_settings " .
65 "(settings_grp, name, value) VALUES (" .
66 $ilDB->quote($a_grp, "text") . "," .
67 $ilDB->quote($a_name, "text") . "," .
68 $ilDB->quote($a_value, "text") .
69 ")");
70 }

Referenced by ilObjAdvancedEditingGUI\savePageEditorSettingsObject().

+ Here is the caller graph for this function:

Field Documentation

◆ $option_groups

array ilPageEditorSettings::$option_groups
staticprotected
Initial value:
= array(
"lm" => array("lm"),
"wiki" => array("wpg"),
"glo" => array("term"),
"test" => array("qpl"),
"rep" => array("cont"),
"copa" => array("copa"),
"frm" => array("frm"),
)

Definition at line 28 of file class.ilPageEditorSettings.php.

Referenced by getGroups().


The documentation for this class was generated from the following file: