ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilFramesetGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
12{
16 protected $lng;
17
21 protected $settings;
22
23
28 public function __construct()
29 {
30 global $DIC;
31
32 $this->lng = $DIC->language();
33 $this->settings = $DIC->settings();
34 $lng = $DIC->language();
35
36 $this->setMainWidth("*");
37 $this->setSideWidth("25%");
38
39 // default titles (accessibility revision)
40 // should not been overwritten, if no good reason is given
41 $this->setSideFrameTitle($lng->txt("side_frame"));
42 $this->setMainFrameTitle($lng->txt("content_frame"));
43 }
44
48 public function setFramesetTitle($a_fs_title)
49 {
50 $this->frameset_title = $a_fs_title;
51 }
52
56 public function setMainFrameSource($a_main_source)
57 {
58 $this->main_frame_source = $a_main_source;
59 }
60
64 public function setMainFrameTitle($a_main_title)
65 {
66 $this->main_frame_title = $a_main_title;
67 }
68
72 public function setMainFrameName($a_main_name)
73 {
74 $this->main_frame_name = $a_main_name;
75 }
76
80 public function setSideFrameSource($a_side_source)
81 {
82 $this->side_frame_source = $a_side_source;
83 }
84
88 public function setSideFrameTitle($a_side_title)
89 {
90 $this->side_frame_title = $a_side_title;
91 }
92
96 public function setSideFrameName($a_side_name)
97 {
98 $this->side_frame_name = $a_side_name;
99 }
100
106 public function setMainWidth($a_mainwidth)
107 {
108 $this->mainwidth = $a_mainwidth;
109 }
110
116 public function getMainWidth()
117 {
118 return $this->mainwidth;
119 }
120
126 public function setSideWidth($a_sidewidth)
127 {
128 $this->sidewidth = $a_sidewidth;
129 }
130
136 public function getSideWidth()
137 {
138 return $this->sidewidth;
139 }
140
144 public function get()
145 {
146 return $this->show(true);
147 }
148
149
153 public function show($a_get_only = false)
154 {
156
157 if ($ilSetting->get("tree_frame") == "right") {
158 $main = "LEFT";
159 $side = "RIGHT";
160 } else {
161 $main = "RIGHT";
162 $side = "LEFT";
163 }
164
165 $tpl = new ilGlobalTemplate("tpl.frameset.html", true, false);
166 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
167
168 $tpl->setVariable("PAGETITLE", "- " . ilUtil::stripScriptHTML($this->frameset_title));
169 $tpl->setVariable("SRC_" . $main, $this->main_frame_source);
170 $tpl->setVariable("SRC_" . $side, $this->side_frame_source);
171 $tpl->setVariable("TITLE_" . $main, $this->main_frame_title);
172 $tpl->setVariable("TITLE_" . $side, $this->side_frame_title);
173 $tpl->setVariable("NAME_" . $main, $this->main_frame_name);
174 $tpl->setVariable("NAME_" . $side, $this->side_frame_name);
175 $tpl->setVariable("WIDTH_" . $main, $this->getMainWidth());
176 $tpl->setVariable("WIDTH_" . $side, $this->getSideWidth());
177 if ($ilSetting->get('short_inst_name') != "") {
178 $tpl->setVariable(
179 "WINDOW_TITLE",
180 $ilSetting->get('short_inst_name')
181 );
182 } else {
183 $tpl->setVariable(
184 "WINDOW_TITLE",
185 "ILIAS"
186 );
187 }
188
189 if ($a_get_only) {
190 return $tpl->get();
191 } else {
192 $tpl->printToStdout("DEFAULT", false);
193 }
194 }
195}
An exception for terminatinating execution or to throw for unit testing.
Class ilFramesetGUI.
__construct()
Constructor @access public.
setMainFrameName($a_main_name)
name for main frame
setSideWidth($a_sidewidth)
Set Side Width.
setMainWidth($a_mainwidth)
Set Main Width.
setSideFrameName($a_side_name)
name for main frame
setSideFrameTitle($a_side_title)
title for side frame
getSideWidth()
Get Side Width.
show($a_get_only=false)
Show frameset.
setSideFrameSource($a_side_source)
source url for side frame
setMainFrameTitle($a_main_title)
title for main frame
setMainFrameSource($a_main_source)
source url for main frame
setFramesetTitle($a_fs_title)
set title for frameset (is normally shown by browser)
getMainWidth()
Get Main Width.
special template class to simplify handling of ITX/PEAR
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
global $DIC
Definition: goto.php:24
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
global $ilSetting
Definition: privfeed.php:17
settings()
Definition: settings.php:2