ILIAS  release_4-4 Revision
ilPCSection Class Reference

Class ilPCSection. More...

+ Inheritance diagram for ilPCSection:
+ Collaboration diagram for ilPCSection:

Public Member Functions

 init ()
 Init page content component. More...
 
 setNode (&$a_node)
 Set node. More...
 
 create (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 Create section node in xml. More...
 
 setCharacteristic ($a_char)
 Set Characteristic of section. More...
 
 getCharacteristic ()
 Get characteristic of section. More...
 
- Public Member Functions inherited from ilPageContent
 __construct ($a_pg_obj)
 Constructor. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 init ()
 Init object. More...
 
 getType ()
 Get type of page content. More...
 
 setNode (&$a_node)
 Set xml node of page content. More...
 
getNode ()
 Get xml node of page content. More...
 
 getJavascriptFiles ()
 Get Javascript files. More...
 
 getCssFiles ()
 Get css files. More...
 
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure. More...
 
 getHierId ()
 Get hierarchical id. More...
 
 lookupHierId ()
 Get hierarchical id from dom. More...
 
 readHierId ()
 Read PC Id. More...
 
 setPcId ($a_pcid)
 Set PC Id. More...
 
 getPCId ()
 Get PC Id. More...
 
 readPCId ()
 Read PC Id. More...
 
 writePCId ($a_pc_id)
 Write pc id. More...
 
 isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b. More...
 
 setEnabled ($value)
 Set Enabled value for page content component. More...
 
 enable ()
 Enable page content. More...
 
 disable ()
 Disable page content. More...
 
 isEnabled ()
 Check whether page content is enabled. More...
 
 createPageContentNode ($a_set_this_node=true)
 Create page content node (always use this method first when adding a new element) More...
 
 modifyPageContentPostXsl ($a_output, $a_mode)
 Modify page content after xsl. More...
 

Static Public Member Functions

static getLangVars ()
 Get lang vars needed for editing. More...
 
- Static Public Member Functions inherited from ilPageContent
static incEdId ($ed_id)
 Increases an hierarchical editing id at lowest level (last number) More...
 
static decEdId ($ed_id)
 Decreases an hierarchical editing id at lowest level (last number) More...
 
static haveSameContainer ($ed_id1, $ed_id2)
 Check, if two ids are in same container. More...
 
static sortHierIds ($a_array)
 Sort an array of Hier IDS in ascending order. More...
 
static getLangVars ()
 Get lang vars needed for editing. More...
 
static handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
 Handle copied content. More...
 
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete ($a_page)
 Before page is being deleted. More...
 
static afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
 After page history entry has been created. More...
 

Data Fields

 $dom
 
 $sec_node
 
- Data Fields inherited from ilPageContent
 $hier_id
 
 $node
 
 $dom
 

Additional Inherited Members

- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type. More...
 

Detailed Description

Class ilPCSection.

Section content object (see ILIAS DTD)

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

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

Member Function Documentation

◆ create()

ilPCSection::create ( $a_pg_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Create section node in xml.

Parameters
object$a_pg_objPage Object
string$a_hier_idHierarchical ID

Definition at line 45 of file class.ilPCSection.php.

References ilPageContent\createPageContentNode(), and IL_INSERT_AFTER.

46  {
47  $this->node = $this->createPageContentNode();
48  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
49  $this->sec_node =& $this->dom->create_element("Section");
50  $this->sec_node =& $this->node->append_child($this->sec_node);
51  $this->sec_node->set_attribute("Characteristic", "Block");
52  }
const IL_INSERT_AFTER
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
+ Here is the call graph for this function:

◆ getCharacteristic()

ilPCSection::getCharacteristic ( )

Get characteristic of section.

Returns
string characteristic

Definition at line 79 of file class.ilPCSection.php.

80  {
81  if (is_object($this->sec_node))
82  {
83  $char = $this->sec_node->get_attribute("Characteristic");
84  if (substr($char, 0, 4) == "ilc_")
85  {
86  $char = substr($char, 4);
87  }
88  return $char;
89  }
90  }

◆ getLangVars()

static ilPCSection::getLangVars ( )
static

Get lang vars needed for editing.

Returns
array array of lang var keys

Definition at line 96 of file class.ilPCSection.php.

97  {
98  return array("ed_insert_section");
99  }

◆ init()

ilPCSection::init ( )

Init page content component.

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

References ilPageContent\setType().

26  {
27  $this->setType("sec");
28  }
setType($a_type)
Set Type.
+ Here is the call graph for this function:

◆ setCharacteristic()

ilPCSection::setCharacteristic (   $a_char)

Set Characteristic of section.

Parameters
string$a_charCharacteristic

Definition at line 59 of file class.ilPCSection.php.

60  {
61  if (!empty($a_char))
62  {
63  $this->sec_node->set_attribute("Characteristic", $a_char);
64  }
65  else
66  {
67  if ($this->sec_node->has_attribute("Characteristic"))
68  {
69  $this->sec_node->remove_attribute("Characteristic");
70  }
71  }
72  }

◆ setNode()

ilPCSection::setNode ( $a_node)

Set node.

Definition at line 33 of file class.ilPCSection.php.

34  {
35  parent::setNode($a_node); // this is the PageContent node
36  $this->sec_node =& $a_node->first_child(); // this is the Section node
37  }

Field Documentation

◆ $dom

ilPCSection::$dom

Definition at line 19 of file class.ilPCSection.php.

◆ $sec_node

ilPCSection::$sec_node

Definition at line 20 of file class.ilPCSection.php.


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