ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilGlobalPageTemplate Class Reference
+ Inheritance diagram for ilGlobalPageTemplate:
+ Collaboration diagram for ilGlobalPageTemplate:

Public Member Functions

 __construct (Services $gs, UIServices $ui, HTTPServices $http)
 
 printToStdout (string $part=self::DEFAULT_BLOCK, bool $a_fill_tabs=true, bool $a_skip_main_menu=false)
 
 printToString ()
 Use this method to get the finally rendered page as string. More...
 
 addJavaScript (string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
 Add a javascript file that should be included in the header. More...
 
 addCss (string $a_css_file, string $media="screen")
 Add a css file that should be included in the header. More...
 
 addOnLoadCode (string $a_code, int $a_batch=2)
 Add on load code. More...
 
 addInlineCss (string $a_css, string $media="screen")
 Add a css file that should be included in the header. More...
 
 setContent (string $a_html)
 Sets content for standard template. More...
 
 setLeftContent (string $a_html)
 Sets content of left column. More...
 
 setRightContent (string $a_html)
 Sets content of right column. More...
 
 setFilter (string $filter)
 
 setTitle (string $a_title, bool $hidden=false)
 Sets title in standard template. More...
 
 setDescription (string $a_descr)
 Sets description below title in standard template. More...
 
 setTitleIcon (string $a_icon_path, string $a_icon_desc="")
 set title icon More...
 
 setBanner (string $img_src)
 
 setAlertProperties (array $a_props)
 Set alert properties. More...
 
 setOnScreenMessage (string $a_type, string $a_txt, bool $a_keep=false)
 Set a message to be displayed to the user. More...
 
 setFileUploadRefId (int $a_ref_id)
 Enables the file upload into this object by dropping a file. More...
 
 setHeaderActionMenu (string $a_header)
 Set header action menu. More...
 
 setHeaderPageTitle (string $a_title)
 Sets the title of the page (for browser window). More...
 
 setPageFormAction (string $a_action)
 Sets the pages form action. More...
 
 addAdminPanelToolbar (ilToolbarGUI $toolb, bool $a_bottom_panel=true, bool $a_arrow=false)
 Add admin panel commands as toolbar. More...
 
 setVariable (string $variable, $value='')
 Sets the given variable to the given value. More...
 
 resetJavascript ()
 Reset javascript files. More...
 
 get (string $part=self::DEFAULT_BLOCK)
 Renders the given block and returns the html string. More...
 
 setCurrentBlock (string $blockname=self::DEFAULT_BLOCK)
 Sets the template to the given block. More...
 
 touchBlock (string $blockname)
 overwrites ITX::touchBlock. More...
 
 parseCurrentBlock (string $blockname=self::DEFAULT_BLOCK)
 Parses the given block. More...
 
 addBlockFile (string $var, string $block, string $template_name, string $in_module=null)
 overwrites ITX::addBlockFile More...
 
 blockExists (string $blockname)
 check if block exists in actual template More...
 
 loadStandardTemplate ()
 This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STATUSLINE placeholders if they are not already loaded. More...
 
 setLocator ()
 Insert locator. More...
 
 setPermanentLink (string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
 Generates and sets a permanent ilias link. More...
 
 setTreeFlatIcon (string $a_link, string $a_mode)
 Sets a tree or flat icon. More...
 
 hideFooter ()
 Make the template hide the footer. More...
 
 setLeftNavContent (string $a_content)
 Sets content of left navigation column. More...
 
 resetHeaderBlock (bool $a_reset_header_action=true)
 Reset all header properties: title, icon, description, alerts, action menu. More...
 
 setLoginTargetPar (string $a_val)
 Set target parameter for login (public sector). More...
 
 getOnLoadCodeForAsynch ()
 Get js onload code for ajax calls. More...
 
 fillJavaScriptFiles (bool $a_force=false)
 Probably adds javascript files. More...
 
 setBodyClass (string $a_class="")
 Sets the body-tags class. More...
 
 clearHeader ()
 Clear header. More...
 
 setTabs (string $a_tabs_html)
 sets tabs in standard template More...
 
 setSubTabs (string $a_tabs_html)
 sets subtabs in standard template More...
 
 getSpecial (string $part=self::DEFAULT_BLOCK, bool $add_error_mess=false, bool $handle_referer=false, bool $add_ilias_footer=false, bool $add_standard_elements=false, bool $a_main_menu=true, bool $a_tabs=true)
 Renders the page with specific elements enabled. More...
 

Protected Member Functions

 prepareOutputHeaders ()
 
 prepareBasicJS ()
 
 prepareBasicCSS ()
 

Protected Attributes

HTTPServices $http
 
Services $gs
 
UIServices $ui
 
PageContentGUI $legacy_content_template
 
ilLanguage $lng
 
ilSetting $il_settings
 
Refinery $refinery
 

Static Protected Attributes

static array $ignored_blocks
 

Additional Inherited Members

- Data Fields inherited from ilGlobalTemplateInterface
const MESSAGE_TYPE_FAILURE = 'failure'
 
const MESSAGE_TYPE_SUCCESS = "success"
 
const MESSAGE_TYPE_QUESTION = "question"
 
const MESSAGE_TYPE_INFO = "info"
 
const MESSAGE_TYPES
 
const DEFAULT_BLOCK = 'DEFAULT'
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilGlobalPageTemplate::__construct ( Services  $gs,
UIServices  $ui,
HTTPServices  $http 
)

Definition at line 59 of file class.ilGlobalPageTemplate.php.

References $DIC, $gs, $http, $ui, ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\ui().

60  {
61  global $DIC;
62  $this->lng = $DIC->language();
63  $this->ui = $ui;
64  $this->gs = $gs;
65  $this->http = $http;
66  $this->legacy_content_template = new PageContentGUI("tpl.page_content.html", true, true);
67  $this->il_settings = $DIC->settings();
68  $this->refinery = $DIC->refinery();
69  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:25
+ Here is the call graph for this function:

Member Function Documentation

◆ addAdminPanelToolbar()

ilGlobalPageTemplate::addAdminPanelToolbar ( ilToolbarGUI  $toolbar,
bool  $is_bottom_panel = true,
bool  $has_arrow = false 
)

Add admin panel commands as toolbar.

Parameters
bool$is_bottom_panelif the panel should be rendered at the bottom of the page as well.
bool$has_arrowif the panel should be rendered with an arrow icon.

Implements ilGlobalTemplateInterface.

Definition at line 252 of file class.ilGlobalPageTemplate.php.

252  : void
253  {
254  $this->legacy_content_template->setAdminPanelCommandsToolbar($toolb);
255  $this->legacy_content_template->setAdminPanelArrow($a_arrow);
256  $this->legacy_content_template->setAdminPanelBottom($a_bottom_panel);
257  }

◆ addBlockFile()

ilGlobalPageTemplate::addBlockFile ( string  $var,
string  $block,
string  $template_name,
string  $in_module = null 
)

overwrites ITX::addBlockFile

Implements ilGlobalTemplateInterface.

Definition at line 321 of file class.ilGlobalPageTemplate.php.

References blockExists().

Referenced by ilInfoScreenGUI\getHTML().

321  : bool
322  {
323  if ($this->blockExists($block)) {
324  $this->legacy_content_template->removeBlockData($block);
325  }
326 
327  return $this->legacy_content_template->addBlockFile($var, $block, $template_name, $in_module);
328  }
blockExists(string $blockname)
check if block exists in actual template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCss()

ilGlobalPageTemplate::addCss ( string  $a_css_file,
string  $media = "screen" 
)

Add a css file that should be included in the header.

Implements ilGlobalTemplateInterface.

Definition at line 156 of file class.ilGlobalPageTemplate.php.

Referenced by setVariable().

156  : void
157  {
158  $this->gs->layout()->meta()->addCss($a_css_file, $media);
159  }
+ Here is the caller graph for this function:

◆ addInlineCss()

ilGlobalPageTemplate::addInlineCss ( string  $a_css,
string  $media = "screen" 
)

Add a css file that should be included in the header.

Implements ilGlobalTemplateInterface.

Definition at line 166 of file class.ilGlobalPageTemplate.php.

166  : void
167  {
168  $this->gs->layout()->meta()->addInlineCss($a_css, $media);
169  }

◆ addJavaScript()

ilGlobalPageTemplate::addJavaScript ( string  $a_js_file,
bool  $a_add_version_parameter = true,
int  $a_batch = 2 
)

Add a javascript file that should be included in the header.

Implements ilGlobalTemplateInterface.

Definition at line 151 of file class.ilGlobalPageTemplate.php.

151  : void
152  {
153  $this->gs->layout()->meta()->addJs($a_js_file, $a_add_version_parameter, $a_batch);
154  }

◆ addOnLoadCode()

ilGlobalPageTemplate::addOnLoadCode ( string  $a_code,
int  $a_batch = 2 
)

Add on load code.

Implements ilGlobalTemplateInterface.

Definition at line 161 of file class.ilGlobalPageTemplate.php.

161  : void
162  {
163  $this->gs->layout()->meta()->addOnloadCode($a_code, $a_batch);
164  }

◆ blockExists()

ilGlobalPageTemplate::blockExists ( string  $block_name)

check if block exists in actual template

Parameters
string$block_name

Implements ilGlobalTemplateInterface.

Definition at line 330 of file class.ilGlobalPageTemplate.php.

Referenced by addBlockFile(), parseCurrentBlock(), setCurrentBlock(), and touchBlock().

330  : bool
331  {
332  if (in_array($blockname, self::$ignored_blocks)) {
333  return false;
334  }
335 
336  return $this->legacy_content_template->blockExists($blockname);
337  }
+ Here is the caller graph for this function:

◆ clearHeader()

ilGlobalPageTemplate::clearHeader ( )

Clear header.

Implements ilGlobalTemplateInterface.

Definition at line 410 of file class.ilGlobalPageTemplate.php.

410  : void
411  {
412  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
413  }
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...

◆ fillJavaScriptFiles()

ilGlobalPageTemplate::fillJavaScriptFiles ( bool  $a_force = false)

Probably adds javascript files.

Implements ilGlobalTemplateInterface.

Definition at line 400 of file class.ilGlobalPageTemplate.php.

400  : void
401  {
402  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
403  }
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...

◆ get()

◆ getOnLoadCodeForAsynch()

ilGlobalPageTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Implements ilGlobalTemplateInterface.

Definition at line 385 of file class.ilGlobalPageTemplate.php.

Referenced by ilExPeerReviewGUI\updateCritAjaxObject().

385  : string
386  {
387  // see e.g. bug #26413
388  $js = "";
389  foreach ($this->gs->layout()->meta()->getOnLoadCode()->getItemsInOrderOfDelivery() as $code) {
390  $js .= $code->getContent() . "\n";
391  }
392  if ($js) {
393  return '<script type="text/javascript">' . "\n" .
394  $js .
395  '</script>' . "\n";
396  }
397  return "";
398  }
+ Here is the caller graph for this function:

◆ getSpecial()

ilGlobalPageTemplate::getSpecial ( string  $part = self::DEFAULT_BLOCK,
bool  $add_error_mess = false,
bool  $handle_referer = false,
bool  $add_ilias_footer = false,
bool  $add_standard_elements = false,
bool  $a_main_menu = true,
bool  $a_tabs = true 
)

Renders the page with specific elements enabled.

Implements ilGlobalTemplateInterface.

Definition at line 425 of file class.ilGlobalPageTemplate.php.

433  : string {
434  throw new NotImplementedException();
435  }
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...

◆ hideFooter()

ilGlobalPageTemplate::hideFooter ( )

Make the template hide the footer.

Implements ilGlobalTemplateInterface.

Definition at line 365 of file class.ilGlobalPageTemplate.php.

365  : void
366  {
367  // Nothing to do
368  }

◆ loadStandardTemplate()

ilGlobalPageTemplate::loadStandardTemplate ( )

This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STATUSLINE placeholders if they are not already loaded.

Implements ilGlobalTemplateInterface.

Definition at line 339 of file class.ilGlobalPageTemplate.php.

339  : void
340  {
341  // Nothing to do
342  }

◆ parseCurrentBlock()

ilGlobalPageTemplate::parseCurrentBlock ( string  $block_name = self::DEFAULT_BLOCK)

Parses the given block.

Implements ilGlobalTemplateInterface.

Definition at line 309 of file class.ilGlobalPageTemplate.php.

References blockExists().

Referenced by assTextQuestionGUI\getBestAnswer(), ilInfoScreenGUI\getHTML(), assTextQuestionGUI\getJsCode(), assLongMenuGUI\getSelectGapTemplate(), ilExPeerReviewGUI\getSubPanel(), assMultipleChoiceGUI\getUseUnchangedAnswerCheckboxHtml(), assLongMenuGUI\populateQuestionSpecificFormPart(), assClozeTestGUI\populateQuestionSpecificFormPart(), assSingleChoiceGUI\renderAggregateView(), and ilDclRecordEditGUI\searchObjects().

309  : bool
310  {
311  if (in_array($blockname, self::$ignored_blocks)) {
312  return false; // TODO why is this needed?
313  }
314  if ($this->blockExists($blockname)) {
315  return $this->legacy_content_template->parseCurrentBlock($blockname);
316  }
317 
318  throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
319  }
blockExists(string $blockname)
check if block exists in actual template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareBasicCSS()

ilGlobalPageTemplate::prepareBasicCSS ( )
protected

Definition at line 116 of file class.ilGlobalPageTemplate.php.

References ilUtil\getNewContentStyleSheetLocation(), and ilUtil\getStyleSheetLocation().

Referenced by printToStdout(), and printToString().

116  : void
117  {
118  $this->gs->layout()->meta()->addCss(ilUtil::getStyleSheetLocation());
119  $this->gs->layout()->meta()->addCss(ilUtil::getNewContentStyleSheetLocation());
120  }
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
static getNewContentStyleSheetLocation(string $mode="output")
get full style sheet file name (path inclusive) of current user
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareBasicJS()

ilGlobalPageTemplate::prepareBasicJS ( )
protected
Exceptions
JsonException

Definition at line 96 of file class.ilGlobalPageTemplate.php.

References ilSessionReminder\byLoggedInUser(), ilBuddySystemGUI\initializeFrontend(), ilOnScreenChatGUI\initializeFrontend(), iljQueryUtil\initjQuery(), iljQueryUtil\initjQueryUI(), and ILIAS\Repository\lng().

Referenced by printToStdout(), and printToString().

96  : void
97  {
100  $this->gs->layout()->meta()->addJs("assets/js/Basic.js", true, 1);
103  GlobalPageHandler::initPage($this);
104 
105  $sessionReminder = new ilSessionReminderGUI(
107  $this,
108  $this->lng
109  );
110 
111  $sessionReminder->populatePage();
112  $onScreenNotifier = new ilNotificationOSDGUI($this, $this->lng);
113  $onScreenNotifier->populatePage();
114  }
static initializeFrontend(ilGlobalTemplateInterface $page)
static initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
static initializeFrontend(ilGlobalTemplateInterface $page)
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutputHeaders()

ilGlobalPageTemplate::prepareOutputHeaders ( )
protected

Definition at line 71 of file class.ilGlobalPageTemplate.php.

References ILIAS\FileDelivery\http(), and ILIAS\Repository\lng().

Referenced by printToStdout(), and printToString().

71  : void
72  {
73  $this->http->saveResponse(
74  $this->http->response()->withAddedHeader(
75  'P3P',
76  'CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"'
77  )
78  );
79 
80  $this->http->saveResponse(
81  $this->http->response()->withAddedHeader('Content-type', 'text/html; charset=UTF-8')
82  );
83 
84  if (defined("ILIAS_HTTP_PATH")) {
85  $this->gs->layout()->meta()->setBaseURL(
86  (substr(ILIAS_HTTP_PATH, -1) === '/' ? ILIAS_HTTP_PATH : ILIAS_HTTP_PATH . '/')
87  );
88  }
89 
90  $this->gs->layout()->meta()->setTextDirection($this->lng->getTextDirection());
91  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printToStdout()

ilGlobalPageTemplate::printToStdout ( string  $part = self::DEFAULT_BLOCK,
bool  $has_tabs = true,
bool  $skip_main_menu = false 
)
Parameters
bool$has_tabsif template variable {TABS} should be filled with content of ilTabs
bool$skip_main_menuif the main menu should be rendered.

Implements ilGlobalTemplateInterface.

Definition at line 122 of file class.ilGlobalPageTemplate.php.

References ilObjLanguageAccess\_saveUsages(), ILIAS\FileDelivery\http(), prepareBasicCSS(), prepareBasicJS(), prepareOutputHeaders(), and ILIAS\Repository\ui().

126  : void {
127  $this->prepareOutputHeaders();
128  $this->prepareBasicJS();
129  $this->prepareBasicCSS();
130 
131  PageContentProvider::setContent($this->legacy_content_template->renderPage(self::DEFAULT_BLOCK, true));
132  $this->http->sendResponse();
133 
134  print $this->ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
135 
136  // save language usages as late as possible
138  }
static http()
Fetches the global http state from ILIAS.
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
+ Here is the call graph for this function:

◆ printToString()

ilGlobalPageTemplate::printToString ( )

Use this method to get the finally rendered page as string.

Implements ilGlobalTemplateInterface.

Definition at line 140 of file class.ilGlobalPageTemplate.php.

References prepareBasicCSS(), prepareBasicJS(), prepareOutputHeaders(), and ILIAS\Repository\ui().

Referenced by ILIAS\Wiki\Export\WikiHtmlExport\exportPageHTML(), ILIAS\Notes\Export\NotesHtmlExport\writeExportFile(), and ILIAS\Wiki\Export\BlogHtmlExport\writeExportFile().

140  : string
141  {
142  $this->prepareOutputHeaders();
143  $this->prepareBasicJS();
144  $this->prepareBasicCSS();
145 
146  PageContentProvider::setContent($this->legacy_content_template->renderPage(self::DEFAULT_BLOCK, true));
147 
148  return $this->ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
149  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetHeaderBlock()

ilGlobalPageTemplate::resetHeaderBlock ( bool  $a_reset_header_action = true)

Reset all header properties: title, icon, description, alerts, action menu.

Implements ilGlobalTemplateInterface.

Definition at line 375 of file class.ilGlobalPageTemplate.php.

375  : void
376  {
377  // Nothing to do
378  }

◆ resetJavascript()

ilGlobalPageTemplate::resetJavascript ( )

Reset javascript files.

Implements ilGlobalTemplateInterface.

Definition at line 273 of file class.ilGlobalPageTemplate.php.

273  : void
274  {
275  $this->gs->layout()->meta()->getJs()->clear();
276  }

◆ setAlertProperties()

ilGlobalPageTemplate::setAlertProperties ( array  $alerts)

Set alert properties.

Parameters
array<int,array>$alerts

Implements ilGlobalTemplateInterface.

Definition at line 222 of file class.ilGlobalPageTemplate.php.

222  : void
223  {
224  $this->legacy_content_template->setTitleAlerts($a_props);
225  }

◆ setBanner()

ilGlobalPageTemplate::setBanner ( string  $img_src)

Definition at line 217 of file class.ilGlobalPageTemplate.php.

217  : void
218  {
219  $this->legacy_content_template->setBanner($img_src);
220  }

◆ setBodyClass()

ilGlobalPageTemplate::setBodyClass ( string  $a_class = "")

Sets the body-tags class.

Implements ilGlobalTemplateInterface.

Definition at line 405 of file class.ilGlobalPageTemplate.php.

405  : void
406  {
407  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
408  }
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...

◆ setContent()

◆ setCurrentBlock()

ilGlobalPageTemplate::setCurrentBlock ( string  $part = self::DEFAULT_BLOCK)

Sets the template to the given block.

Implements ilGlobalTemplateInterface.

Definition at line 283 of file class.ilGlobalPageTemplate.php.

References blockExists().

Referenced by assTextQuestionGUI\getBestAnswer(), ilInfoScreenGUI\getHTML(), assTextQuestionGUI\getJsCode(), assLongMenuGUI\getSelectGapTemplate(), ilExPeerReviewGUI\getSubPanel(), assMultipleChoiceGUI\getUseUnchangedAnswerCheckboxHtml(), assSingleChoiceGUI\renderAggregateView(), and ilDclRecordEditGUI\searchObjects().

283  : bool
284  {
285  if (in_array($blockname, self::$ignored_blocks)) {
286  return false;
287  }
288 
289  if ($this->blockExists($blockname)) {
290  return $this->legacy_content_template->setCurrentBlock($blockname);
291  }
292  throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
293  }
blockExists(string $blockname)
check if block exists in actual template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDescription()

ilGlobalPageTemplate::setDescription ( string  $a_descr)

Sets description below title in standard template.

Implements ilGlobalTemplateInterface.

Definition at line 206 of file class.ilGlobalPageTemplate.php.

Referenced by ilExAssignmentEditorGUI\setAssignmentHeader().

206  : void
207  {
208  $this->legacy_content_template->setTitleDesc($a_descr);
209  }
+ Here is the caller graph for this function:

◆ setFileUploadRefId()

ilGlobalPageTemplate::setFileUploadRefId ( int  $a_ref_id)

Enables the file upload into this object by dropping a file.

Implements ilGlobalTemplateInterface.

Definition at line 232 of file class.ilGlobalPageTemplate.php.

232  : void
233  {
234  $this->legacy_content_template->setFileUploadRefId($a_ref_id);
235  }

◆ setFilter()

ilGlobalPageTemplate::setFilter ( string  $filter)

Definition at line 186 of file class.ilGlobalPageTemplate.php.

186  : void
187  {
188  $this->legacy_content_template->setFilter($filter);
189  }

◆ setHeaderActionMenu()

ilGlobalPageTemplate::setHeaderActionMenu ( string  $a_header)

Set header action menu.

Implements ilGlobalTemplateInterface.

Definition at line 237 of file class.ilGlobalPageTemplate.php.

237  : void
238  {
239  $this->legacy_content_template->setHeaderAction($a_header);
240  }

◆ setHeaderPageTitle()

ilGlobalPageTemplate::setHeaderPageTitle ( string  $a_title)

Sets the title of the page (for browser window).

Implements ilGlobalTemplateInterface.

Definition at line 242 of file class.ilGlobalPageTemplate.php.

242  : void
243  {
244  PageContentProvider::setViewTitle($a_title);
245  }

◆ setLeftContent()

ilGlobalPageTemplate::setLeftContent ( string  $a_html)

Sets content of left column.

Implements ilGlobalTemplateInterface.

Definition at line 176 of file class.ilGlobalPageTemplate.php.

176  : void
177  {
178  $this->legacy_content_template->setLeftContent($a_html);
179  }

◆ setLeftNavContent()

ilGlobalPageTemplate::setLeftNavContent ( string  $a_content)

Sets content of left navigation column.

Implements ilGlobalTemplateInterface.

Definition at line 370 of file class.ilGlobalPageTemplate.php.

370  : void
371  {
372  // Nothing to do, this should be handled in Slates later
373  }

◆ setLocator()

ilGlobalPageTemplate::setLocator ( )

Insert locator.

Implements ilGlobalTemplateInterface.

Definition at line 344 of file class.ilGlobalPageTemplate.php.

344  : void
345  {
346  // Nothing to do
347  }

◆ setLoginTargetPar()

ilGlobalPageTemplate::setLoginTargetPar ( string  $a_val)

Set target parameter for login (public sector).

This is used by the main menu

Implements ilGlobalTemplateInterface.

Definition at line 380 of file class.ilGlobalPageTemplate.php.

380  : void
381  {
382  // Nothing to do
383  }

◆ setOnScreenMessage()

ilGlobalPageTemplate::setOnScreenMessage ( string  $type,
string  $a_txt,
bool  $a_keep = false 
)

Set a message to be displayed to the user.

Please use instead of ilUtil::sendInfo(), ilUtil::sendSuccess() and ilUtil::sendFailure().

Implements ilGlobalTemplateInterface.

Definition at line 227 of file class.ilGlobalPageTemplate.php.

227  : void
228  {
229  $this->legacy_content_template->setOnScreenMessage($a_type, $a_txt, $a_keep);
230  }

◆ setPageFormAction()

ilGlobalPageTemplate::setPageFormAction ( string  $a_action)

Sets the pages form action.

Implements ilGlobalTemplateInterface.

Definition at line 247 of file class.ilGlobalPageTemplate.php.

247  : void
248  {
249  $this->legacy_content_template->setPageFormAction($a_action);
250  }

◆ setPermanentLink()

ilGlobalPageTemplate::setPermanentLink ( string  $a_type,
?int  $a_id,
string  $a_append = "",
string  $a_target = "",
string  $a_title = "" 
)

Generates and sets a permanent ilias link.

Implements ilGlobalTemplateInterface.

Definition at line 349 of file class.ilGlobalPageTemplate.php.

References ilLink\_getStaticLink().

355  : void {
356  $href = ilLink::_getStaticLink($a_id, $a_type, true, $a_append);
357  PageContentProvider::setPermaLink($href);
358  }
+ Here is the call graph for this function:

◆ setRightContent()

ilGlobalPageTemplate::setRightContent ( string  $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

Definition at line 181 of file class.ilGlobalPageTemplate.php.

Referenced by ILIAS\Wiki\Export\WikiHtmlExport\exportPageHTML(), ilInfoScreenGUI\showSummary(), and ILIAS\Wiki\Export\BlogHtmlExport\writeExportFile().

181  : void
182  {
183  $this->legacy_content_template->setRightContent($a_html);
184  }
+ Here is the caller graph for this function:

◆ setSubTabs()

ilGlobalPageTemplate::setSubTabs ( string  $a_tabs_html)

sets subtabs in standard template

Implements ilGlobalTemplateInterface.

Definition at line 420 of file class.ilGlobalPageTemplate.php.

420  : void
421  {
422  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
423  }
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...

◆ setTabs()

ilGlobalPageTemplate::setTabs ( string  $a_tabs_html)

sets tabs in standard template

Implements ilGlobalTemplateInterface.

Definition at line 415 of file class.ilGlobalPageTemplate.php.

415  : void
416  {
417  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
418  }
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...

◆ setTitle()

ilGlobalPageTemplate::setTitle ( string  $a_title,
bool  $hidden = false 
)

Sets title in standard template.

Will override the header_page_title.

Implements ilGlobalTemplateInterface.

Definition at line 191 of file class.ilGlobalPageTemplate.php.

Referenced by ILIAS\Wiki\Export\WikiHtmlExport\exportPageHTML(), ilExAssignmentEditorGUI\setAssignmentHeader(), ilExPeerReviewGUI\showGivenPeerReviewObject(), and ilExPeerReviewGUI\showReceivedPeerReviewObject().

191  : void
192  {
193  $this->legacy_content_template->setTitle($a_title, $hidden);
194 
195  $short_title = (string) $this->il_settings->get('short_inst_name');
196  if (trim($short_title) === "") {
197  $short_title = 'ILIAS';
198  }
199 
200  PageContentProvider::setShortTitle($short_title);
201  PageContentProvider::setViewTitle($a_title);
202  $header_title = ilObjSystemFolder::_getHeaderTitle();
203  PageContentProvider::setTitle($header_title);
204  }
+ Here is the caller graph for this function:

◆ setTitleIcon()

ilGlobalPageTemplate::setTitleIcon ( string  $a_icon_path,
string  $a_icon_desc = "" 
)

set title icon

Implements ilGlobalTemplateInterface.

Definition at line 211 of file class.ilGlobalPageTemplate.php.

Referenced by ILIAS\Wiki\Export\WikiHtmlExport\exportPageHTML().

211  : void
212  {
213  $this->legacy_content_template->setIconPath($a_icon_path);
214  $this->legacy_content_template->setIconDesc($a_icon_desc);
215  }
+ Here is the caller graph for this function:

◆ setTreeFlatIcon()

ilGlobalPageTemplate::setTreeFlatIcon ( string  $a_link,
string  $a_mode 
)

Sets a tree or flat icon.

Parameters
string$a_mode("tree" | "flat")

Implements ilGlobalTemplateInterface.

Definition at line 360 of file class.ilGlobalPageTemplate.php.

360  : void
361  {
362  // Nothing to do
363  }

◆ setVariable()

ilGlobalPageTemplate::setVariable ( string  $variable,
  $value = '' 
)

Sets the given variable to the given value.

Parameters
mixed$value

Implements ilGlobalTemplateInterface.

Definition at line 259 of file class.ilGlobalPageTemplate.php.

References addCss(), and ILIAS\Repository\refinery().

Referenced by assTextQuestionGUI\getBestAnswer(), ilInfoScreenGUI\getHTML(), assTextQuestionGUI\getJsCode(), assQuestionGUI\getPreviousSolutionConfirmationCheckboxHtml(), assImagemapQuestionGUI\getPreviousSolutionConfirmationCheckboxHtml(), assLongMenuGUI\getSelectGapTemplate(), ilExPeerReviewGUI\getSubPanel(), assLongMenuGUI\getTextGapTemplate(), assMultipleChoiceGUI\getUseUnchangedAnswerCheckboxHtml(), assQuestionGUI\getUseUnchangedAnswerCheckboxHtml(), assLongMenuGUI\populateQuestionSpecificFormPart(), assClozeTestGUI\populateQuestionSpecificFormPart(), assSingleChoiceGUI\renderAggregateView(), and ilDclRecordEditGUI\searchObjects().

259  : void
260  {
261  if ($variable === "LOCATION_CONTENT_STYLESHEET" || $variable === "LOCATION_SYNTAX_STYLESHEET") {
262  $this->addCss($value);
263 
264  return;
265  }
266 
267  $this->legacy_content_template->setVariable(
268  $variable,
269  $this->refinery->kindlyTo()->string()->transform($value)
270  );
271  }
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ touchBlock()

ilGlobalPageTemplate::touchBlock ( string  $block)

overwrites ITX::touchBlock.

Implements ilGlobalTemplateInterface.

Definition at line 295 of file class.ilGlobalPageTemplate.php.

References blockExists().

Referenced by ilInfoScreenGUI\getHTML(), assTextQuestionGUI\getJsCode(), and assMultipleChoiceGUI\getUseUnchangedAnswerCheckboxHtml().

295  : bool
296  {
297  if (in_array($blockname, self::$ignored_blocks)) {
298  return false;
299  }
300 
301  if ($this->blockExists($blockname)) {
302  $this->legacy_content_template->touchBlock($blockname);
303  return true;
304  }
305 
306  throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
307  }
blockExists(string $blockname)
check if block exists in actual template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $gs

Services ilGlobalPageTemplate::$gs
protected

Definition at line 38 of file class.ilGlobalPageTemplate.php.

Referenced by __construct().

◆ $http

HTTPServices ilGlobalPageTemplate::$http
protected

Definition at line 37 of file class.ilGlobalPageTemplate.php.

Referenced by __construct().

◆ $ignored_blocks

array ilGlobalPageTemplate::$ignored_blocks
staticprotected
Initial value:
= [
self::DEFAULT_BLOCK,
'ContentStyle',
"SyntaxStyle",
"",
]

Definition at line 48 of file class.ilGlobalPageTemplate.php.

◆ $il_settings

ilSetting ilGlobalPageTemplate::$il_settings
protected

Definition at line 42 of file class.ilGlobalPageTemplate.php.

◆ $legacy_content_template

PageContentGUI ilGlobalPageTemplate::$legacy_content_template
protected

Definition at line 40 of file class.ilGlobalPageTemplate.php.

◆ $lng

ilLanguage ilGlobalPageTemplate::$lng
protected

Definition at line 41 of file class.ilGlobalPageTemplate.php.

◆ $refinery

Refinery ilGlobalPageTemplate::$refinery
protected

Definition at line 43 of file class.ilGlobalPageTemplate.php.

◆ $ui

UIServices ilGlobalPageTemplate::$ui
protected

Definition at line 39 of file class.ilGlobalPageTemplate.php.

Referenced by __construct().


The documentation for this class was generated from the following file: