5require_once(
"./Services/COPage/classes/class.ilPageContent.php");
42 $this->ctrl =
$DIC->ctrl();
43 $this->lng =
$DIC->language();
53 parent::setNode($a_node);
54 $this->q_node = $a_node->first_child();
60 public function create(&$a_pg_obj, $a_hier_id)
64 $this->q_node = $this->dom->create_element(
"PlaceHolder");
65 $this->q_node = $this->node->append_child($this->q_node);
75 if (is_object($this->q_node)) {
76 $this->q_node->set_attribute(
"ContentClass", $a_class);
87 if (is_object($this->q_node)) {
88 return $this->q_node->get_attribute(
"ContentClass", $a_class);
100 if (is_object($this->q_node)) {
101 $this->q_node->set_attribute(
"Height", $a_height);
113 if (is_object($this->q_node)) {
114 return $this->q_node->get_attribute(
"Height", $a_class);
135 return array(
"question_placeh",
"media_placeh",
"text_placeh",
136 "ed_insert_plach",
"question_placehl",
"media_placehl",
"text_placehl",
137 "verification_placeh",
"verification_placehl");
154 $start = strpos($a_html,
"{{{{{PlaceHolder#");
155 if (is_int($start)) {
156 $end = strpos($a_html,
"}}}}}", $start);
160 $param = substr($a_html, $start + 17, $end - $start - 17);
166 $html =
$lng->txt(
"cont_text_placeh");
170 $html =
$lng->txt(
"cont_media_placeh");
174 $html =
$lng->txt(
"cont_question_placeh");
178 $html =
$lng->txt(
"cont_verification_placeh");
182 $h2 = substr($a_html, 0, $start) .
184 substr($a_html, $end + 5);
188 $start = strpos($a_html,
"{{{{{PlaceHolder#", $start + 5);
190 if (is_int($start)) {
191 $end = strpos($a_html,
"}}}}}", $start);
An exception for terminatinating execution or to throw for unit testing.
static getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
static getLangVars()
Get lang vars needed for editing.
getContentClass()
Get Content Class.
setContentClass($a_class)
Set Content Class.
init()
Init page content component.
setNode($a_node)
Set node.
setHeight($a_height)
Set Height.
getCssFiles($a_mode)
Get css files.
getClass()
Get characteristic of PlaceHolder.
modifyPageContentPostXsl($a_html, $a_mode, $a_abstract_only=false)
@inheritDoc
create(&$a_pg_obj, $a_hier_id)
Create PlaceHolder Element.
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.