ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilImprintGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
5require_once("./Services/Imprint/classes/class.ilImprint.php");
6
18{
22 protected $locator;
23
27 protected $main_menu;
28
32 public function __construct()
33 {
34 global $DIC;
35
36 $this->tpl = $DIC["tpl"];
37 $this->ctrl = $DIC->ctrl();
38 $this->locator = $DIC["ilLocator"];
39 $this->lng = $DIC->language();
40 $this->main_menu = $DIC["ilMainMenu"];
41 $tpl = $DIC["tpl"];
42
43 if (!ilImprint::_exists("impr", 1)) {
44 $page = new ilImprint("impr");
45 $page->setId(1);
46 $page->create();
47 }
48
49 // there is only 1 imprint page
50 parent::__construct("impr", 1);
51
52 // content style (using system defaults)
53 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
54
55 $tpl->setCurrentBlock("SyntaxStyle");
56 $tpl->setVariable(
57 "LOCATION_SYNTAX_STYLESHEET",
59 );
60 $tpl->parseCurrentBlock();
61
62 $tpl->setCurrentBlock("ContentStyle");
63 $tpl->setVariable(
64 "LOCATION_CONTENT_STYLESHEET",
66 );
67 $tpl->parseCurrentBlock();
68 }
69
73 public function executeCommand()
74 {
76 $ilLocator = $this->locator;
78
79 if ($_REQUEST["baseClass"] == "ilImprintGUI") {
80 $this->renderFullscreen();
81 }
82
83 $next_class = $ilCtrl->getNextClass($this);
84
85 $title = $lng->txt("adm_imprint");
86
87 switch ($next_class) {
88 case "ilpageobjectgui":
89 die("Deprecated. ilImprintGUI gui forwarding to ilpageobject");
90 return;
91
92 default:
94
95 $ilLocator->addItem(
96 $title,
97 $ilCtrl->getLinkTarget($this, "preview")
98 );
99
100 return parent::executeCommand();
101 }
102 }
103
104 public function postOutputProcessing($a_output)
105 {
107
108 if ($this->getOutputMode() == IL_PAGE_PREVIEW) {
109 if (!$this->getPageObject()->getActive()) {
110 ilUtil::sendInfo($lng->txt("adm_imprint_inactive"));
111 }
112 }
113
114 return $a_output;
115 }
116
117 protected function renderFullscreen()
118 {
121 $ilMainMenu = $this->main_menu;
122
123 if (!ilImprint::isActive()) {
124 ilUtil::redirect("ilias.php?baseClass=ilPersonalDesktopGUI");
125 }
126
127 $tpl->getStandardTemplate();
128
129 $this->setRawPageContent(true);
130 $html = $this->showPage();
131
132 $itpl = new ilTemplate("tpl.imprint.html", true, true, "Services/Imprint");
133 $itpl->setVariable("PAGE_TITLE", $lng->txt("imprint"));
134 $itpl->setVariable("IMPRINT", $html);
135 unset($html);
136
137 $tpl->setContent($itpl->get());
138
139 $ilMainMenu->showLogoOnly(true);
140
141 echo $tpl->show("DEFAULT", true, false);
142 exit();
143 }
144}
exit
Definition: backend.php:16
An exception for terminatinating execution or to throw for unit testing.
const IL_PAGE_PREVIEW
Class ilImprintGUI.
postOutputProcessing($a_output)
Finalizing output processing.
__construct()
Constructor.
executeCommand()
execute command
Class ilImprint.
static isActive()
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
Class ilPageObjectGUI.
setPresentationTitle($a_title="")
showPage()
display content of page
setRawPageContent($a_rawpagecontent)
Set Get raw page content only.
getPageObject()
Get Page Object.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
special template class to simplify handling of ITX/PEAR
static redirect($a_script)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7