ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
+ 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 253 of file class.ilGlobalPageTemplate.php.

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

◆ addBlockFile()

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

overwrites ITX::addBlockFile

Implements ilGlobalTemplateInterface.

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

References blockExists().

Referenced by ilInfoScreenGUI\getHTML().

322  : bool
323  {
324  if ($this->blockExists($block)) {
325  $this->legacy_content_template->removeBlockData($block);
326  }
327 
328  return $this->legacy_content_template->addBlockFile($var, $block, $template_name, $in_module);
329  }
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 157 of file class.ilGlobalPageTemplate.php.

Referenced by setVariable().

157  : void
158  {
159  $this->gs->layout()->meta()->addCss($a_css_file, $media);
160  }
+ 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 167 of file class.ilGlobalPageTemplate.php.

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

◆ 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 152 of file class.ilGlobalPageTemplate.php.

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

◆ addOnLoadCode()

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

Add on load code.

Implements ilGlobalTemplateInterface.

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

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

◆ blockExists()

ilGlobalPageTemplate::blockExists ( string  $block_name)

check if block exists in actual template

Parameters
string$block_name

Implements ilGlobalTemplateInterface.

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

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

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

◆ clearHeader()

ilGlobalPageTemplate::clearHeader ( )

Clear header.

Implements ilGlobalTemplateInterface.

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

411  : void
412  {
413  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
414  }
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 401 of file class.ilGlobalPageTemplate.php.

401  : void
402  {
403  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
404  }
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 386 of file class.ilGlobalPageTemplate.php.

Referenced by ilExPeerReviewGUI\updateCritAjaxObject().

386  : string
387  {
388  // see e.g. bug #26413
389  $js = "";
390  foreach ($this->gs->layout()->meta()->getOnLoadCode()->getItemsInOrderOfDelivery() as $code) {
391  $js .= $code->getContent() . "\n";
392  }
393  if ($js) {
394  return '<script type="text/javascript">' . "\n" .
395  $js .
396  '</script>' . "\n";
397  }
398  return "";
399  }
+ 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 426 of file class.ilGlobalPageTemplate.php.

434  : string {
435  throw new NotImplementedException();
436  }
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 366 of file class.ilGlobalPageTemplate.php.

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

◆ 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 340 of file class.ilGlobalPageTemplate.php.

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

◆ parseCurrentBlock()

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

Parses the given block.

Implements ilGlobalTemplateInterface.

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

References blockExists().

Referenced by assLongMenuGUI\getAggregatedAnswersView(), assTextQuestionGUI\getBestAnswer(), ilInfoScreenGUI\getHTML(), assTextQuestionGUI\getJsCode(), assLongMenuGUI\getSelectGapTemplate(), ilExPeerReviewGUI\getSubPanel(), assMultipleChoiceGUI\getUseUnchangedAnswerCheckboxHtml(), assLongMenuGUI\populateQuestionSpecificFormPart(), assClozeTestGUI\populateQuestionSpecificFormPart(), assNumericGUI\renderAggregateView(), assOrderingHorizontalGUI\renderAggregateView(), assTextSubsetGUI\renderAggregateView(), assOrderingQuestionGUI\renderAggregateView(), assImagemapQuestionGUI\renderAggregateView(), assSingleChoiceGUI\renderAggregateView(), assKprimChoiceGUI\renderAggregateView(), assMultipleChoiceGUI\renderAggregateView(), and ilDclRecordEditGUI\searchObjects().

310  : bool
311  {
312  if (in_array($blockname, self::$ignored_blocks)) {
313  return false; // TODO why is this needed?
314  }
315  if ($this->blockExists($blockname)) {
316  return $this->legacy_content_template->parseCurrentBlock($blockname);
317  }
318 
319  throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
320  }
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 117 of file class.ilGlobalPageTemplate.php.

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

Referenced by printToStdout(), and printToString().

117  : void
118  {
119  $this->gs->layout()->meta()->addCss(ilUtil::getStyleSheetLocation());
120  $this->gs->layout()->meta()->addCss(ilUtil::getNewContentStyleSheetLocation());
121  }
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
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(), ilUIFramework\init(), 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("./Services/JavaScript/js/Basic.js", true, 1);
101  ilUIFramework::init($this);
104  GlobalPageHandler::initPage($this);
105 
106  $sessionReminder = new ilSessionReminderGUI(
108  $this,
109  $this->lng
110  );
111 
112  $sessionReminder->populatePage();
113  $onScreenNotifier = new ilNotificationOSDGUI($this, $this->lng);
114  $onScreenNotifier->populatePage();
115  }
static initializeFrontend(ilGlobalTemplateInterface $page)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 init(ilGlobalTemplateInterface $template=null)
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 123 of file class.ilGlobalPageTemplate.php.

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

127  : void {
128  $this->prepareOutputHeaders();
129  $this->prepareBasicJS();
130  $this->prepareBasicCSS();
131 
132  PageContentProvider::setContent($this->legacy_content_template->renderPage(self::DEFAULT_BLOCK, true));
133  $this->http->sendResponse();
134 
135  print $this->ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
136 
137  // save language usages as late as possible
139  }
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 141 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\Blog\Export\BlogHtmlExport\writeExportFile().

141  : string
142  {
143  $this->prepareOutputHeaders();
144  $this->prepareBasicJS();
145  $this->prepareBasicCSS();
146 
147  PageContentProvider::setContent($this->legacy_content_template->renderPage(self::DEFAULT_BLOCK, true));
148 
149  return $this->ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
150  }
+ 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 376 of file class.ilGlobalPageTemplate.php.

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

◆ resetJavascript()

ilGlobalPageTemplate::resetJavascript ( )

Reset javascript files.

Implements ilGlobalTemplateInterface.

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

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

◆ setAlertProperties()

ilGlobalPageTemplate::setAlertProperties ( array  $alerts)

Set alert properties.

Parameters
array<int,array>$alerts

Implements ilGlobalTemplateInterface.

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

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

◆ setBanner()

ilGlobalPageTemplate::setBanner ( string  $img_src)

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

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

◆ setBodyClass()

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

Sets the body-tags class.

Implements ilGlobalTemplateInterface.

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

406  : void
407  {
408  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
409  }
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 284 of file class.ilGlobalPageTemplate.php.

References blockExists().

Referenced by assTextQuestionGUI\getBestAnswer(), ilInfoScreenGUI\getHTML(), assTextQuestionGUI\getJsCode(), assLongMenuGUI\getSelectGapTemplate(), ilExPeerReviewGUI\getSubPanel(), assMultipleChoiceGUI\getUseUnchangedAnswerCheckboxHtml(), assNumericGUI\renderAggregateView(), assOrderingHorizontalGUI\renderAggregateView(), assTextSubsetGUI\renderAggregateView(), assOrderingQuestionGUI\renderAggregateView(), assImagemapQuestionGUI\renderAggregateView(), assSingleChoiceGUI\renderAggregateView(), assKprimChoiceGUI\renderAggregateView(), assMultipleChoiceGUI\renderAggregateView(), and ilDclRecordEditGUI\searchObjects().

284  : bool
285  {
286  if (in_array($blockname, self::$ignored_blocks)) {
287  return false;
288  }
289 
290  if ($this->blockExists($blockname)) {
291  return $this->legacy_content_template->setCurrentBlock($blockname);
292  }
293  throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
294  }
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 207 of file class.ilGlobalPageTemplate.php.

Referenced by ilExAssignmentEditorGUI\setAssignmentHeader().

207  : void
208  {
209  $this->legacy_content_template->setTitleDesc($a_descr);
210  }
+ 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 233 of file class.ilGlobalPageTemplate.php.

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

◆ setFilter()

ilGlobalPageTemplate::setFilter ( string  $filter)

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

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

◆ setHeaderActionMenu()

ilGlobalPageTemplate::setHeaderActionMenu ( string  $a_header)

Set header action menu.

Implements ilGlobalTemplateInterface.

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

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

◆ setHeaderPageTitle()

ilGlobalPageTemplate::setHeaderPageTitle ( string  $a_title)

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

Implements ilGlobalTemplateInterface.

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

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

◆ setLeftContent()

ilGlobalPageTemplate::setLeftContent ( string  $a_html)

Sets content of left column.

Implements ilGlobalTemplateInterface.

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

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

◆ setLeftNavContent()

ilGlobalPageTemplate::setLeftNavContent ( string  $a_content)

Sets content of left navigation column.

Implements ilGlobalTemplateInterface.

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

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

◆ setLocator()

ilGlobalPageTemplate::setLocator ( )

Insert locator.

Implements ilGlobalTemplateInterface.

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

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

◆ 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 381 of file class.ilGlobalPageTemplate.php.

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

◆ 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 228 of file class.ilGlobalPageTemplate.php.

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

◆ setPageFormAction()

ilGlobalPageTemplate::setPageFormAction ( string  $a_action)

Sets the pages form action.

Implements ilGlobalTemplateInterface.

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

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

◆ 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 350 of file class.ilGlobalPageTemplate.php.

References ilLink\_getStaticLink().

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

◆ setRightContent()

ilGlobalPageTemplate::setRightContent ( string  $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

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

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

182  : void
183  {
184  $this->legacy_content_template->setRightContent($a_html);
185  }
+ 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 421 of file class.ilGlobalPageTemplate.php.

421  : void
422  {
423  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
424  }
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 416 of file class.ilGlobalPageTemplate.php.

416  : void
417  {
418  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
419  }
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 192 of file class.ilGlobalPageTemplate.php.

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

192  : void
193  {
194  $this->legacy_content_template->setTitle($a_title, $hidden);
195 
196  $short_title = (string) $this->il_settings->get('short_inst_name');
197  if (trim($short_title) === "") {
198  $short_title = 'ILIAS';
199  }
200 
201  PageContentProvider::setShortTitle($short_title);
202  PageContentProvider::setViewTitle($a_title);
203  $header_title = ilObjSystemFolder::_getHeaderTitle();
204  PageContentProvider::setTitle($header_title);
205  }
+ 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 212 of file class.ilGlobalPageTemplate.php.

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

212  : void
213  {
214  $this->legacy_content_template->setIconPath($a_icon_path);
215  $this->legacy_content_template->setIconDesc($a_icon_desc);
216  }
+ 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 361 of file class.ilGlobalPageTemplate.php.

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

◆ setVariable()

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

Sets the given variable to the given value.

Parameters
mixed$value

Implements ilGlobalTemplateInterface.

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

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

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

260  : void
261  {
262  if ($variable === "LOCATION_CONTENT_STYLESHEET" || $variable === "LOCATION_SYNTAX_STYLESHEET") {
263  $this->addCss($value);
264 
265  return;
266  }
267 
268  $this->legacy_content_template->setVariable(
269  $variable,
270  $this->refinery->kindlyTo()->string()->transform($value)
271  );
272  }
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 296 of file class.ilGlobalPageTemplate.php.

References blockExists().

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

296  : bool
297  {
298  if (in_array($blockname, self::$ignored_blocks)) {
299  return false;
300  }
301 
302  if ($this->blockExists($blockname)) {
303  $this->legacy_content_template->touchBlock($blockname);
304  return true;
305  }
306 
307  throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
308  }
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: