ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilCOPagePCDef Class Reference

COPage PC elements definition handler. More...

+ Collaboration diagram for ilCOPagePCDef:

Static Public Member Functions

static init ()
 Init. More...
 
static getPCDefinitions ()
 Get PC definitions. More...
 
static getPCDefinitionByType ($a_pc_type)
 Get PC definition by type. More...
 
static getPCDefinitionByName ($a_pc_name)
 Get PC definition by name. More...
 
static getPCDefinitionByGUIClassName ($a_gui_class_name)
 Get PC definition by name. More...
 
static requirePCClassByName ($a_name)
 Get instance. More...
 
static requirePCGUIClassByName ($a_name)
 Get instance. More...
 
static isPCGUIClassName ($a_class_name, $a_lower_case=false)
 Is given class name a pc gui class? More...
 

Static Public Attributes

static $pc_def = null
 
static $pc_def_by_name = null
 
static $pc_gui_classes = array()
 
static $pc_gui_classes_lc = array()
 
static $pc_def_by_gui_class_cl = array()
 

Detailed Description

COPage PC elements definition handler.

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

Definition at line 12 of file class.ilCOPagePCDef.php.

Member Function Documentation

◆ getPCDefinitionByGUIClassName()

static ilCOPagePCDef::getPCDefinitionByGUIClassName (   $a_gui_class_name)
static

Get PC definition by name.

Parameters
stringname
Returns
array definition

Definition at line 89 of file class.ilCOPagePCDef.php.

Referenced by ilPageEditorGUI\executeCommand().

90  {
91  self::init();
92  $a_gui_class_name = strtolower($a_gui_class_name);
93  return self::$pc_def_by_gui_class_cl[$a_gui_class_name];
94  }
+ Here is the caller graph for this function:

◆ getPCDefinitionByName()

static ilCOPagePCDef::getPCDefinitionByName (   $a_pc_name)
static

Get PC definition by name.

Parameters
stringname
Returns
array definition

Definition at line 77 of file class.ilCOPagePCDef.php.

Referenced by ilPageObject\getContentObject().

78  {
79  self::init();
80  return self::$pc_def_by_name[$a_pc_name];
81  }
+ Here is the caller graph for this function:

◆ getPCDefinitionByType()

static ilCOPagePCDef::getPCDefinitionByType (   $a_pc_type)
static

Get PC definition by type.

Parameters
stringtype
Returns
array definition

Definition at line 65 of file class.ilCOPagePCDef.php.

Referenced by ilPageEditorGUI\executeCommand().

66  {
67  self::init();
68  return self::$pc_def[$a_pc_type];
69  }
+ Here is the caller graph for this function:

◆ getPCDefinitions()

static ilCOPagePCDef::getPCDefinitions ( )
static

Get PC definitions.

Parameters

Definition at line 53 of file class.ilCOPagePCDef.php.

Referenced by ilPageObject\__afterHistoryEntry(), ilPageObject\__afterUpdate(), ilPageObject\__beforeDelete(), ilPageConfig\__construct(), ilPageObject\getLanguageVariablesXML(), ilPageObject\handleCopiedContent(), and ilPageObjectGUI\showPage().

54  {
55  self::init();
56  return self::$pc_def;
57  }
+ Here is the caller graph for this function:

◆ init()

static ilCOPagePCDef::init ( )
static

Init.

Parameters

Definition at line 26 of file class.ilCOPagePCDef.php.

References $DIC.

27  {
28  global $DIC;
29 
30  $db = $DIC->database();
31 
32  if (self::$pc_def == null) {
33  $set = $db->query("SELECT * FROM copg_pc_def ");
34  while ($rec = $db->fetchAssoc($set)) {
35  $rec["pc_class"] = "ilPC" . $rec["name"];
36  $rec["pc_gui_class"] = "ilPC" . $rec["name"] . "GUI";
37  self::$pc_gui_classes[] = $rec["pc_gui_class"];
38  self::$pc_gui_classes_lc[] = strtolower($rec["pc_gui_class"]);
39  self::$pc_def[$rec["pc_type"]] = $rec;
40  self::$pc_def_by_name[$rec["name"]] = $rec;
41  self::$pc_def_by_gui_class_cl[strtolower($rec["pc_gui_class"])] = $rec;
42  }
43  }
44  }
global $DIC
Definition: saml.php:7

◆ isPCGUIClassName()

static ilCOPagePCDef::isPCGUIClassName (   $a_class_name,
  $a_lower_case = false 
)
static

Is given class name a pc gui class?

Parameters

Definition at line 130 of file class.ilCOPagePCDef.php.

Referenced by ilPageEditorGUI\executeCommand().

131  {
132  if ($a_lower_case) {
133  return in_array($a_class_name, self::$pc_gui_classes_lc);
134  } else {
135  return in_array($a_class_name, self::$pc_gui_classes);
136  }
137  }
+ Here is the caller graph for this function:

◆ requirePCClassByName()

static ilCOPagePCDef::requirePCClassByName (   $a_name)
static

Get instance.

Parameters

Definition at line 102 of file class.ilCOPagePCDef.php.

References $pc_def.

Referenced by ilPageObject\__afterHistoryEntry(), ilPageObject\__afterUpdate(), ilPageObject\__beforeDelete(), ilPageObject\getLanguageVariablesXML(), ilPageObject\handleCopiedContent(), and ilPageObjectGUI\showPage().

103  {
104  $pc_def = self::getPCDefinitionByName($a_name);
105  $pc_class = "ilPC" . $pc_def["name"];
106  $pc_path = "./" . $pc_def["component"] . "/" . $pc_def["directory"] . "/class." . $pc_class . ".php";
107  include_once($pc_path);
108  }
+ Here is the caller graph for this function:

◆ requirePCGUIClassByName()

static ilCOPagePCDef::requirePCGUIClassByName (   $a_name)
static

Get instance.

Parameters

Definition at line 116 of file class.ilCOPagePCDef.php.

References $pc_def.

Referenced by ilPageEditorGUI\executeCommand().

117  {
118  $pc_def = self::getPCDefinitionByName($a_name);
119  $pc_class = "ilPC" . $pc_def["name"] . "GUI";
120  $pc_path = "./" . $pc_def["component"] . "/" . $pc_def["directory"] . "/class." . $pc_class . ".php";
121  include_once($pc_path);
122  }
+ Here is the caller graph for this function:

Field Documentation

◆ $pc_def

ilCOPagePCDef::$pc_def = null
static

Definition at line 14 of file class.ilCOPagePCDef.php.

Referenced by requirePCClassByName(), and requirePCGUIClassByName().

◆ $pc_def_by_gui_class_cl

ilCOPagePCDef::$pc_def_by_gui_class_cl = array()
static

Definition at line 18 of file class.ilCOPagePCDef.php.

◆ $pc_def_by_name

ilCOPagePCDef::$pc_def_by_name = null
static

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

◆ $pc_gui_classes

ilCOPagePCDef::$pc_gui_classes = array()
static

Definition at line 16 of file class.ilCOPagePCDef.php.

◆ $pc_gui_classes_lc

ilCOPagePCDef::$pc_gui_classes_lc = array()
static

Definition at line 17 of file class.ilCOPagePCDef.php.


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