ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilPageEditorSettings Class Reference

Page editor settings. More...

+ Collaboration diagram for ilPageEditorSettings:

Static Public Member Functions

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

Static Protected Attributes

static $option_groups
 

Detailed Description

Page editor settings.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Member Function Documentation

◆ getGroups()

static ilPageEditorSettings::getGroups ( )
static

Get all settings groups.

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

References $option_groups.

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

+ Here is the caller graph for this function:

◆ lookupSetting()

static ilPageEditorSettings::lookupSetting (   $a_grp,
  $a_name,
  $a_default = false 
)
static

Lookup setting.

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

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 }
global $ilDB

References $ilDB.

Referenced by ilObjAdvancedEditingGUI\initPageEditorForm(), and lookupSettingByParentType().

+ Here is the caller graph for this function:

◆ lookupSettingByParentType()

static ilPageEditorSettings::lookupSettingByParentType (   $a_par_type,
  $a_name,
  $a_default = false 
)
static

Lookup setting by parent type.

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

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 }
static lookupSetting($a_grp, $a_name, $a_default=false)
Lookup setting.

References lookupSetting().

Referenced by ilPageContentGUI\getBBMenu(), ilPCParagraphGUI\getCharStyleSelector(), and ilPageObjectGUI\getTinyMenu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeSetting()

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

Write Setting.

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

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 }

References $ilDB.

Referenced by ilObjAdvancedEditingGUI\savePageEditorSettingsObject().

+ Here is the caller graph for this function:

Field Documentation

◆ $option_groups

ilPageEditorSettings::$option_groups
staticprotected
Initial value:
= array(
"lm" => array("lm", "dbk"),
"wiki" => array("wpg"),
"scorm" => array("sahs"),
"glo" => array("gdf"),
"test" => array("qpl"),
"rep" => array("root", "cat", "grp", "crs", "fold")
)

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

Referenced by getGroups().


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