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

COPage PC elements definition handler. More...

+ Collaboration diagram for ilCOPagePCDef:

Public Member Functions

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

Static Public Member Functions

static init ()
 Init. More...
 
static requirePCClassByName ($a_name)
 Get instance. More...
 
static requirePCGUIClassByName ($a_name)
 Get instance. 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()

ilCOPagePCDef::getPCDefinitionByGUIClassName (   $a_gui_class_name)

Get PC definition by name.

Parameters
stringname
Returns
array definition

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

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 }
static init()
Init.

References init().

Referenced by ilPageEditorGUI\executeCommand().

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

◆ getPCDefinitionByName()

ilCOPagePCDef::getPCDefinitionByName (   $a_pc_name)

Get PC definition by name.

Parameters
stringname
Returns
array definition

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

78 {
79 self::init();
80 return self::$pc_def_by_name[$a_pc_name];
81 }

References init().

Referenced by ilPageObject\getContentObject(), requirePCClassByName(), and requirePCGUIClassByName().

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

◆ getPCDefinitionByType()

ilCOPagePCDef::getPCDefinitionByType (   $a_pc_type)

Get PC definition by type.

Parameters
stringtype
Returns
array definition

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

66 {
67 self::init();
68 return self::$pc_def[$a_pc_type];
69 }

References init().

Referenced by ilPageEditorGUI\executeCommand().

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

◆ getPCDefinitions()

ilCOPagePCDef::getPCDefinitions ( )

Get PC definitions.

Parameters

return

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

54 {
55 self::init();
56 return self::$pc_def;
57 }

References $pc_def, and init().

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

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

◆ init()

static ilCOPagePCDef::init ( )
static

Init.

Parameters

return

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

27 {
28 global $ilDB;
29
30 if (self::$pc_def == null)
31 {
32 $set = $ilDB->query("SELECT * FROM copg_pc_def ");
33 while ($rec = $ilDB->fetchAssoc($set))
34 {
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 $ilDB

References $ilDB.

Referenced by getPCDefinitionByGUIClassName(), getPCDefinitionByName(), getPCDefinitionByType(), and getPCDefinitions().

+ Here is the caller graph for this function:

◆ isPCGUIClassName()

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

Is given class name a pc gui class?

Parameters

return

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

131 {
132 if ($a_lower_case)
133 {
134 return in_array($a_class_name, self::$pc_gui_classes_lc);
135 }
136 else
137 {
138 return in_array($a_class_name, self::$pc_gui_classes);
139 }
140 }

Referenced by ilPageEditorGUI\executeCommand().

+ Here is the caller graph for this function:

◆ requirePCClassByName()

static ilCOPagePCDef::requirePCClassByName (   $a_name)
static

Get instance.

Parameters

return

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

103 {
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 }
getPCDefinitionByName($a_pc_name)
Get PC definition by name.

References $pc_def, and getPCDefinitionByName().

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

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

◆ requirePCGUIClassByName()

static ilCOPagePCDef::requirePCGUIClassByName (   $a_name)
static

Get instance.

Parameters

return

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

117 {
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 }

References $pc_def, and getPCDefinitionByName().

Referenced by ilPageEditorGUI\executeCommand().

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

Field Documentation

◆ $pc_def

ilCOPagePCDef::$pc_def = null
static

◆ $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: