ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilPCPlaceHolder.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5require_once("./Services/COPage/classes/class.ilPageContent.php");
6
18
19 //class of placeholder
20
21 var $q_node; // node of Paragraph element
24
28 function init()
29 {
30 $this->setType("plach");
31 }
32
33
37 function setNode(&$a_node)
38 {
39 parent::setNode($a_node); // this is the PageContent node
40 $this->q_node =& $a_node->first_child(); //... and this the PlaceHolder
41 }
42
46 function create(&$a_pg_obj, $a_hier_id)
47 {
48 $this->createPageContentNode();
49 $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER);
50 $this->q_node = $this->dom->create_element("PlaceHolder");
51 $this->q_node = $this->node->append_child($this->q_node);
52 }
53
59 function setContentClass($a_class)
60 {
61 if (is_object($this->q_node))
62 {
63 $this->q_node->set_attribute("ContentClass", $a_class);
64 }
65 }
66
72 function getContentClass()
73 {
74 if (is_object($this->q_node))
75 {
76 return $this->q_node->get_attribute("ContentClass", $a_class);
77 }
78 return false;
79 }
80
86 function setHeight($a_height)
87 {
88 if (is_object($this->q_node))
89 {
90 $this->q_node->set_attribute("Height", $a_height);
91 }
92 }
93
94
100 function getHeight()
101 {
102 if (is_object($this->q_node))
103 {
104 return $this->q_node->get_attribute("Height", $a_class);
105 }
106 return false;
107 }
108
114 function getClass()
115 {
116 return "";
117 }
118
123 static function getLangVars()
124 {
125 return array("question_placeh","media_placeh","text_placeh",
126 "ed_insert_plach","question_placehl","media_placehl","text_placehl",
127 "verification_placeh", "verification_placehl");
128 }
129
130
131
132}
const IL_INSERT_AFTER
Class ilPlaceHolder.
static getLangVars()
Get lang vars needed for editing.
getContentClass()
Get Content Class.
setContentClass($a_class)
Set Content Class.
init()
Init page content component.
setHeight($a_height)
Set Height.
setNode(&$a_node)
Set node.
getClass()
Get characteristic of PlaceHolder.
create(&$a_pg_obj, $a_hier_id)
Create PlaceHolder Element.
Class ilPageContent.
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element)
setType($a_type)
Set Type.