ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCOPagePCDef Class Reference

COPage PC elements definition handler. More...

+ Collaboration diagram for ilCOPagePCDef:

Public Member Functions

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

Static Public Member Functions

static init ()
 Init.
static requirePCClassByName ($a_name)
 Get instance.
static requirePCGUIClassByName ($a_name)
 Get instance.

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

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.

References init().

Referenced by ilPageEditorGUI\executeCommand().

{
$a_gui_class_name = strtolower($a_gui_class_name);
return self::$pc_def_by_gui_class_cl[$a_gui_class_name];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCOPagePCDef::getPCDefinitionByName (   $a_pc_name)

Get PC definition by name.

Parameters
stringname
Returns
array definition

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

References init().

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

{
return self::$pc_def_by_name[$a_pc_name];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCOPagePCDef::getPCDefinitionByType (   $a_pc_type)

Get PC definition by type.

Parameters
stringtype
Returns
array definition

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

References init().

Referenced by ilPageEditorGUI\executeCommand().

{
return self::$pc_def[$a_pc_type];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCOPagePCDef::getPCDefinitions ( )

Get PC definitions.

Parameters
@return

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

References $pc_def, and init().

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

{
return self::$pc_def;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilCOPagePCDef::init ( )
static

Init.

Parameters
@return

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

References $ilDB.

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

{
global $ilDB;
if (self::$pc_def == null)
{
$set = $ilDB->query("SELECT * FROM copg_pc_def ");
while ($rec = $ilDB->fetchAssoc($set))
{
$rec["pc_class"] = "ilPC".$rec["name"];
$rec["pc_gui_class"] = "ilPC".$rec["name"]."GUI";
self::$pc_gui_classes[] = $rec["pc_gui_class"];
self::$pc_gui_classes_lc[] = strtolower($rec["pc_gui_class"]);
self::$pc_def[$rec["pc_type"]] = $rec;
self::$pc_def_by_name[$rec["name"]] = $rec;
self::$pc_def_by_gui_class_cl[strtolower($rec["pc_gui_class"])] = $rec;
}
}
}

+ Here is the caller graph for this function:

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.

Referenced by ilPageEditorGUI\executeCommand().

{
if ($a_lower_case)
{
return in_array($a_class_name, self::$pc_gui_classes_lc);
}
else
{
return in_array($a_class_name, self::$pc_gui_classes);
}
}

+ Here is the caller graph for this function:

static ilCOPagePCDef::requirePCClassByName (   $a_name)
static

Get instance.

Parameters
@return

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

References $pc_def, and getPCDefinitionByName().

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

{
$pc_class = "ilPC".$pc_def["name"];
$pc_path = "./".$pc_def["component"]."/".$pc_def["directory"]."/class.".$pc_class.".php";
include_once($pc_path);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilCOPagePCDef::requirePCGUIClassByName (   $a_name)
static

Get instance.

Parameters
@return

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

References $pc_def, and getPCDefinitionByName().

Referenced by ilPageEditorGUI\executeCommand().

{
$pc_class = "ilPC".$pc_def["name"]."GUI";
$pc_path = "./".$pc_def["component"]."/".$pc_def["directory"]."/class.".$pc_class.".php";
include_once($pc_path);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilCOPagePCDef::$pc_def = null
static
ilCOPagePCDef::$pc_def_by_gui_class_cl = array()
static

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

ilCOPagePCDef::$pc_def_by_name = null
static

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

ilCOPagePCDef::$pc_gui_classes = array()
static

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

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: