ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 28 of file class.ilPageEditorSettings.php.

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

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

References $DIC, and $ilDB.

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

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

References lookupSetting().

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

81  {
82  foreach (self::$option_groups as $g => $types) {
83  if (in_array($a_par_type, $types)) {
84  $grp = $g;
85  }
86  }
87 
88  if ($grp != "") {
89  return ilPageEditorSettings::lookupSetting($grp, $a_name, $a_default);
90  }
91 
92  return $a_default;
93  }
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 36 of file class.ilPageEditorSettings.php.

References $DIC, and $ilDB.

Referenced by ilObjAdvancedEditingGUI\savePageEditorSettingsObject().

37  {
38  global $DIC;
39 
40  $ilDB = $DIC->database();
41 
42  $ilDB->manipulate(
43  "DELETE FROM page_editor_settings WHERE " .
44  "settings_grp = " . $ilDB->quote($a_grp, "text") .
45  " AND name = " . $ilDB->quote($a_name, "text")
46  );
47 
48  $ilDB->manipulate("INSERT INTO page_editor_settings " .
49  "(settings_grp, name, value) VALUES (" .
50  $ilDB->quote($a_grp, "text") . "," .
51  $ilDB->quote($a_name, "text") . "," .
52  $ilDB->quote($a_value, "text") .
53  ")");
54  }
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:
= array(
"lm" => array("lm"),
"wiki" => array("wpg"),
"scorm" => array("sahs"),
"glo" => array("gdf"),
"test" => array("qpl"),
"rep" => array("root", "cat", "grp", "crs", "fold"),
"copa" => array("copa"),
)

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


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