ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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.

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

28  {
29  return self::$option_groups;
30  }
+ 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 58 of file class.ilPageEditorSettings.php.

References $DIC, and $ilDB.

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

59  {
60  global $DIC;
61 
62  $ilDB = $DIC->database();
63 
64  $set = $ilDB->query(
65  "SELECT value FROM page_editor_settings " .
66  " WHERE settings_grp = " . $ilDB->quote($a_grp, "text") .
67  " AND name = " . $ilDB->quote($a_name, "text")
68  );
69  if ($rec = $ilDB->fetchAssoc($set)) {
70  return $rec["value"];
71  }
72 
73  return $a_default;
74  }
global $DIC
Definition: saml.php:7
global $ilDB
+ 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 79 of file class.ilPageEditorSettings.php.

References lookupSetting().

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

80  {
81  foreach (self::$option_groups as $g => $types) {
82  if (in_array($a_par_type, $types)) {
83  $grp = $g;
84  }
85  }
86 
87  if ($grp != "") {
88  return ilPageEditorSettings::lookupSetting($grp, $a_name, $a_default);
89  }
90 
91  return $a_default;
92  }
static lookupSetting($a_grp, $a_name, $a_default=false)
Lookup setting.
+ 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.

References $DIC, and $ilDB.

Referenced by ilObjAdvancedEditingGUI\savePageEditorSettingsObject().

36  {
37  global $DIC;
38 
39  $ilDB = $DIC->database();
40 
41  $ilDB->manipulate(
42  "DELETE FROM page_editor_settings WHERE " .
43  "settings_grp = " . $ilDB->quote($a_grp, "text") .
44  " AND name = " . $ilDB->quote($a_name, "text")
45  );
46 
47  $ilDB->manipulate("INSERT INTO page_editor_settings " .
48  "(settings_grp, name, value) VALUES (" .
49  $ilDB->quote($a_grp, "text") . "," .
50  $ilDB->quote($a_name, "text") . "," .
51  $ilDB->quote($a_value, "text") .
52  ")");
53  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the caller graph for this function:

Field Documentation

◆ $option_groups

ilPageEditorSettings::$option_groups
staticprotected
Initial value:
"lm" => array("lm"),
"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.


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