ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 protected $parent_obj;
18
24 public function __construct($a_gui, ilContainer $a_parent_obj)
25 {
26 include_once "Services/Container/classes/class.ilContainerStartObjects.php";
27 $this->parent_gui = $a_gui;
28 $this->parent_obj = $a_parent_obj;
29 $this->start_object = new ilContainerStartObjects($a_parent_obj->getRefId(),
30 $a_parent_obj->getId());
31 }
32
39 public function enableDesktop($a_value, ilContainerGUI $a_parent_gui)
40 {
41 $this->enable_desktop = (bool)$a_value;
42
43 if($this->enable_desktop)
44 {
45 $this->parent_gui = $a_parent_gui;
46 }
47 }
48
54 public function getHTML()
55 {
56 global $tpl, $lng;
57
58 $lng->loadLanguageModule("crs");
59
60 include_once "Services/Container/classes/class.ilContainerStartObjectsContentTableGUI.php";
62 $this->parent_gui,
63 "",
64 $this->start_object,
65 $this->enable_desktop
66 );
67 $tpl->setContent(
68 $this->getPageHTML().
69 $tbl->getHTML()
70 );
71 }
72
79 protected function getPageHTML()
80 {
81 global $tpl, $ilSetting, $ilUser;
82
83 if (!$ilSetting->get("enable_cat_page_edit"))
84 {
85 return;
86 }
87
88 $page_id = $this->start_object->getObjId();
89
90 // if page does not exist, return nothing
91 include_once("./Services/COPage/classes/class.ilPageUtil.php");
92 if (!ilPageUtil::_existsAndNotEmpty("cstr", $page_id))
93 {
94 return;
95 }
96 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
97 $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
99 $this->parent_obj->getStyleSheetId(), $this->parent_obj->getType())));
100 $tpl->setCurrentBlock("SyntaxStyle");
101 $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
103 $tpl->parseCurrentBlock();
104
105 include_once("./Services/Container/classes/class.ilContainerStartObjectsPageGUI.php");
106 $page_gui = new ilContainerStartObjectsPageGUI($page_id);
107
108 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
110 $this->parent_obj->getStyleSheetId(), $this->parent_obj->getType()));
111
112 $page_gui->setPresentationTitle("");
113 $page_gui->setTemplateOutput(false);
114 $page_gui->setHeader("");
115 return $page_gui->showPage();
116 }
117}
118
119?>
global $tpl
Definition: ilias.php:8
Class ilContainerGUI.
__construct($a_gui, ilContainer $a_parent_obj)
Constructor.
getHTML()
Get container start objects list (presentation)
enableDesktop($a_value, ilContainerGUI $a_parent_gui)
Toggle add-to/remove-from-desktop.
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)
$tbl
Definition: example_048.php:81
global $lng
Definition: privfeed.php:40
global $ilSetting
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15