ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilAccessibilityControlConceptGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
15 protected $tpl;
16
20 protected $lng;
21
25 protected $ctrl;
26
30 protected $http;
31
32 protected $user;
33
35
39 public function __construct()
40 {
41 global $DIC;
42
43 $ilCtrl = $DIC->ctrl();
44 $tpl = $DIC["tpl"];
45 $lng = $DIC->language();
46 $http = $DIC->http();
47 $user = $DIC->user();
48 $settings = $DIC->settings();
49 $accessibilityEvaluation = $DIC['acc.document.evaluator'];
50
51 $this->ctrl = $ilCtrl;
52 $this->tpl = $tpl;
53 $this->lng = $lng;
54 $this->http = $http;
55 $this->user = $user;
56 $this->settings = $settings;
57 $this->accessibilityEvaluation = $accessibilityEvaluation;
58
59 $this->user->setLanguage($this->lng->getLangKey());
60 }
61
62
66 public function executeCommand()
67 {
68 $cmd = $this->ctrl->getCmd("showControlConcept");
69 if (in_array($cmd, array("showControlConcept"))) {
70 $this->$cmd();
71 }
72 }
73
77 protected function printToGlobalTemplate($tpl)
78 {
79 global $DIC;
80 $gtpl = $DIC['tpl'];
81 $gtpl->setContent($tpl->get());
82 $gtpl->printToStdout("DEFAULT", false, true);
83 }
84
89 protected function initTemplate($a_tmpl)
90 {
91 $tpl = new ilGlobalTemplate("tpl.main.html", true, true);
92 $template_file = $a_tmpl;
93 $template_dir = 'Services/Accessibility';
94 $tpl->addBlockFile('CONTENT', 'content', $template_file, $template_dir);
95 return $tpl;
96 }
97
101 protected function showControlConcept()
102 {
103 if (!$this->user->getId()) {
104 $this->user->setId(ANONYMOUS_USER_ID);
105 }
106
107 $this->tpl->loadStandardTemplate();
108 $this->tpl->setTitle($this->lng->txt("accessibility_control_concept"));
109
110 $tpl = $this->initTemplate('tpl.view_accessibility_control_concept.html');
111
112 $handleDocument = $this->accessibilityEvaluation->hasDocument();
113 if ($handleDocument) {
114 $document = $this->accessibilityEvaluation->document();
115 $tpl->setVariable('ACCESSIBILITY_CONTROL_CONCEPT_CONTENT', $document->content());
116 } else {
119 : $this->settings->get("admin_email");
120 $tpl->setVariable(
121 'ACCESSIBILITY_CONTROL_CONCEPT_CONTENT',
122 sprintf(
123 $this->lng->txt('no_accessibility_control_concept_description'),
124 'mailto:' . $mails
125 )
126 );
127 }
128
130 }
131
137 public static function getFooterLink()
138 {
139 global $DIC;
140 $ilCtrl = $DIC->ctrl();
141
143 return "";
144 }
145
146 return $ilCtrl->getLinkTargetByClass("ilaccessibilitycontrolconceptgui");
147 }
148
154 public static function getFooterText()
155 {
156 global $DIC;
157
158 $lng = $DIC->language();
159 return $lng->txt("accessibility_control_concept");
160 }
161}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
showControlConcept()
Show accessibility control concept.
special template class to simplify handling of ITX/PEAR
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
const ANONYMOUS_USER_ID
Definition: constants.php:25
global $DIC
Definition: goto.php:24
static http()
Fetches the global http state from ILIAS.
settings()
Definition: settings.php:2