ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilPCPlaceHolder.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 require_once("./Services/COPage/classes/class.ilPageContent.php");
25 
38 
39  //class of placeholder
40 
41  var $q_node; // node of Paragraph element
43  var $height;
44 
48  function init()
49  {
50  $this->setType("plach");
51  }
52 
53 
57  function setNode(&$a_node)
58  {
59  parent::setNode($a_node); // this is the PageContent node
60  $this->q_node =& $a_node->first_child(); //... and this the PlaceHolder
61  }
62 
66  function create(&$a_pg_obj, $a_hier_id)
67  {
68  $this->createPageContentNode();
69  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER);
70  $this->q_node = $this->dom->create_element("PlaceHolder");
71  $this->q_node = $this->node->append_child($this->q_node);
72  }
73 
79  function setContentClass($a_class)
80  {
81  if (is_object($this->q_node))
82  {
83  $this->q_node->set_attribute("ContentClass", $a_class);
84  }
85  }
86 
92  function getContentClass()
93  {
94  if (is_object($this->q_node))
95  {
96  return $this->q_node->get_attribute("ContentClass", $a_class);
97  }
98  return false;
99  }
100 
106  function setHeight($a_height)
107  {
108  if (is_object($this->q_node))
109  {
110  $this->q_node->set_attribute("Height", $a_height);
111  }
112  }
113 
114 
120  function getHeight()
121  {
122  if (is_object($this->q_node))
123  {
124  return $this->q_node->get_attribute("Height", $a_class);
125  }
126  return false;
127  }
128 
134  function getClass()
135  {
136  return "";
137  }
138 
139 
140 
141 
142 }