ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilCOPageDefinitionProcessor Class Reference
+ Inheritance diagram for ilCOPageDefinitionProcessor:
+ Collaboration diagram for ilCOPageDefinitionProcessor:

Public Member Functions

 __construct (\ilDBInterface $db)
 
 purge ()
 This methods is supposed to purge existing data in the provider of the component, so new components can be added to a clean slate. More...
 
 beginComponent (string $component, string $type)
 This method is called when parsing of component.xml for the given component starts. More...
 
 endComponent (string $component, string $type)
 This method is called when parsing of component.xml for the given component ends. More...
 
 beginTag (string $name, array $attributes)
 This is called when a tag starts in the context of the given component. More...
 
 endTag (string $name)
 This is called when a tag ends in the context of the given component. More...
 

Protected Attributes

ilDBInterface $db
 
string $component = null
 
string $type = null
 

Detailed Description

Definition at line 21 of file class.ilCOPageDefinitionProcessor.php.

Constructor & Destructor Documentation

◆ __construct()

ilCOPageDefinitionProcessor::__construct ( \ilDBInterface  $db)

Definition at line 27 of file class.ilCOPageDefinitionProcessor.php.

References $db.

28  {
29  $this->db = $db;
30  }

Member Function Documentation

◆ beginComponent()

ilCOPageDefinitionProcessor::beginComponent ( string  $component,
string  $type 
)

This method is called when parsing of component.xml for the given component starts.

This is supposed to reset any internal parsing state.

Implements ilComponentDefinitionProcessor.

Definition at line 38 of file class.ilCOPageDefinitionProcessor.php.

References $component, and $type.

38  : void
39  {
40  $this->component = $component;
41  $this->type = $type;
42  }

◆ beginTag()

ilCOPageDefinitionProcessor::beginTag ( string  $name,
array  $attributes 
)

This is called when a tag starts in the context of the given component.

Parameters
string[]$attributes

Implements ilComponentDefinitionProcessor.

Definition at line 50 of file class.ilCOPageDefinitionProcessor.php.

50  : void
51  {
52  switch ($name) {
53  case "pagecontent":
54  $this->db->manipulate("INSERT INTO copg_pc_def " .
55  "(pc_type, name, component, directory, int_links, style_classes, xsl, def_enabled, top_item, order_nr) VALUES (" .
56  $this->db->quote($attributes["pc_type"], "text") . "," .
57  $this->db->quote($attributes["name"], "text") . "," .
58  $this->db->quote($this->type . "/" . $this->component, "text") . "," .
59  $this->db->quote($attributes["directory"], "text") . "," .
60  $this->db->quote($attributes["int_links"], "integer") . "," .
61  $this->db->quote($attributes["style_classes"], "integer") . "," .
62  $this->db->quote($attributes["xsl"], "integer") . "," .
63  $this->db->quote($attributes["def_enabled"], "integer") . "," .
64  $this->db->quote($attributes["top_item"], "integer") . "," .
65  $this->db->quote($attributes["order_nr"], "integer") .
66  ")");
67  break;
68 
69  case "pageobject":
70  $this->db->manipulate("INSERT INTO copg_pobj_def " .
71  "(parent_type, class_name, component, directory) VALUES (" .
72  $this->db->quote($attributes["parent_type"], "text") . "," .
73  $this->db->quote($attributes["class_name"], "text") . "," .
74  $this->db->quote($this->type . "/" . $this->component, "text") . "," .
75  $this->db->quote($attributes["directory"], "text") .
76  ")");
77  break;
78  }
79  }

◆ endComponent()

ilCOPageDefinitionProcessor::endComponent ( string  $component,
string  $type 
)

This method is called when parsing of component.xml for the given component ends.

Implements ilComponentDefinitionProcessor.

Definition at line 44 of file class.ilCOPageDefinitionProcessor.php.

References null.

44  : void
45  {
46  $this->component = null;
47  $this->type = null;
48  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ endTag()

ilCOPageDefinitionProcessor::endTag ( string  $name)

This is called when a tag ends in the context of the given component.

Implements ilComponentDefinitionProcessor.

Definition at line 81 of file class.ilCOPageDefinitionProcessor.php.

81  : void
82  {
83  }

◆ purge()

ilCOPageDefinitionProcessor::purge ( )

This methods is supposed to purge existing data in the provider of the component, so new components can be added to a clean slate.

Implements ilComponentDefinitionProcessor.

Definition at line 32 of file class.ilCOPageDefinitionProcessor.php.

32  : void
33  {
34  $this->db->manipulate("DELETE FROM copg_pc_def");
35  $this->db->manipulate("DELETE FROM copg_pobj_def");
36  }

Field Documentation

◆ $component

string ilCOPageDefinitionProcessor::$component = null
protected

Definition at line 24 of file class.ilCOPageDefinitionProcessor.php.

Referenced by beginComponent().

◆ $db

ilDBInterface ilCOPageDefinitionProcessor::$db
protected

Definition at line 23 of file class.ilCOPageDefinitionProcessor.php.

Referenced by __construct().

◆ $type

string ilCOPageDefinitionProcessor::$type = null
protected

Definition at line 25 of file class.ilCOPageDefinitionProcessor.php.

Referenced by beginComponent().


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