ILIAS  release_7 Revision v7.30-3-g800a261c036
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 {
75 $ilCtrl = $this->ctrl;
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:
93 $this->setPresentationTitle($title);
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() == ilPageObjectGUI::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
122 if (!ilImprint::isActive()) {
123 ilUtil::redirect("ilias.php?baseClass=ilDashboardGUI");
124 }
125 $tpl->setTitle($lng->txt("imprint"));
126 $tpl->loadStandardTemplate();
127
128 $this->setRawPageContent(true);
129 $html = $this->showPage();
130 $tpl->setContent($html);
131
132 $tpl->printToStdout("DEFAULT", true, false);
133 exit();
134 }
135}
An exception for terminatinating execution or to throw for unit testing.
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, $add_token=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.
static redirect($a_script)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $DIC
Definition: goto.php:24
exit
Definition: login.php:29
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc