ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilContainerStartObjectsContentGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
13{
14 protected $start_object; // [ilContainerStartObjects]
15 protected $enable_desktop; // [bool]
16 protected $parent_gui; // [ilContainerGUI]
17
23 public function __construct(ilContainer $a_parent_obj)
24 {
25 include_once "Services/Container/classes/class.ilContainerStartObjects.php";
26 $this->parent_gui = $a_parent_obj;
27 $this->start_object = new ilContainerStartObjects($a_parent_obj->getRefId(),
28 $a_parent_obj->getId());
29 }
30
37 public function enableDesktop($a_value, ilContainerGUI $a_parent_gui)
38 {
39 $this->enable_desktop = (bool)$a_value;
40
41 if($this->enable_desktop)
42 {
43 $this->parent_gui = $a_parent_gui;
44 }
45 }
46
52 public function getHTML()
53 {
54 global $tpl, $lng;
55
56 $lng->loadLanguageModule("crs");
57
58 include_once "Services/Container/classes/class.ilContainerStartObjectsContentTableGUI.php";
60 $this->parent_gui,
61 "",
62 $this->start_object,
63 $this->enable_desktop
64 );
65 $tpl->setContent(
66 $this->getPageHTML().
67 $tbl->getHTML()
68 );
69 }
70
77 protected function getPageHTML()
78 {
79 global $tpl, $ilSetting, $ilUser;
80
81 if (!$ilSetting->get("enable_cat_page_edit"))
82 {
83 return;
84 }
85
86 $page_id = $this->start_object->getObjId();
87
88 // if page does not exist, return nothing
89 include_once("./Services/COPage/classes/class.ilPageUtil.php");
90 if (!ilPageUtil::_existsAndNotEmpty("cstr", $page_id))
91 {
92 return;
93 }
94
95 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
96 $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
98 $tpl->setCurrentBlock("SyntaxStyle");
99 $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
101 $tpl->parseCurrentBlock();
102
103 include_once("./Services/Container/classes/class.ilContainerStartObjectsPageGUI.php");
104 $page_gui = new ilContainerStartObjectsPageGUI($page_id);
105
106 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
107 $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0));
108
109 $page_gui->setPresentationTitle("");
110 $page_gui->setTemplateOutput(false);
111 $page_gui->setHeader("");
112 return $page_gui->showPage();
113 }
114}
115
116?>
global $tpl
Definition: ilias.php:8
Class ilContainerGUI.
getHTML()
Get container start objects list (presentation)
enableDesktop($a_value, ilContainerGUI $a_parent_gui)
Toggle add-to/remove-from-desktop.
__construct(ilContainer $a_parent_obj)
Constructor.
Container start objects page GUI class.
Class ilContainer.
getContentStylePath($a_style_id)
get content style path
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
getSyntaxStylePath()
get syntax style path
getRefId()
get reference id @access public
getId()
get object id @access public
_existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
global $lng
Definition: privfeed.php:40
global $ilSetting
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15