ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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)
 
 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...
 
- Public Member Functions inherited from ILIAS\UICore\GlobalTemplate
 addAdminPanelToolbar (\ilToolbarGUI $toolbar, bool $is_bottom_panel=true, bool $has_arrow=false)
 Add admin panel commands as toolbar. More...
 

Protected Member Functions

 prepareOutputHeaders ()
 
 prepareBasicJS ()
 
 prepareBasicCSS ()
 

Protected Attributes

HTTPServices $http
 
Services $gs
 
ilLoggerFactory $logger_factory
 
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 ILIAS\UICore\GlobalTemplate
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 60 of file class.ilGlobalPageTemplate.php.

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

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

Member Function Documentation

◆ addAdminPanelToolbar()

ilGlobalPageTemplate::addAdminPanelToolbar ( ilToolbarGUI  $toolb,
bool  $a_bottom_panel = true,
bool  $a_arrow = false 
)

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

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

◆ addBlockFile()

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

overwrites ITX::addBlockFile

Implements ILIAS\UICore\GlobalTemplate.

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

References blockExists().

Referenced by ilInfoScreenGUI\getHTML().

324  : bool
325  {
326  if ($this->blockExists($block)) {
327  $this->legacy_content_template->removeBlockData($block);
328  }
329 
330  return $this->legacy_content_template->addBlockFile($var, $block, $template_name, $in_module);
331  }
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 ILIAS\UICore\GlobalTemplate.

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

Referenced by setVariable().

159  : void
160  {
161  $this->gs->layout()->meta()->addCss($a_css_file, $media);
162  }
+ 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 ILIAS\UICore\GlobalTemplate.

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

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

◆ 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 ILIAS\UICore\GlobalTemplate.

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

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

◆ addOnLoadCode()

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

Add on load code.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ blockExists()

ilGlobalPageTemplate::blockExists ( string  $block_name)

check if block exists in actual template

Parameters
string$block_name

Implements ILIAS\UICore\GlobalTemplate.

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

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

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

◆ clearHeader()

ilGlobalPageTemplate::clearHeader ( )

Clear header.

Implements ILIAS\UICore\GlobalTemplate.

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

413  : void
414  {
415  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
416  }
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 ILIAS\UICore\GlobalTemplate.

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

403  : void
404  {
405  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
406  }
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 ILIAS\UICore\GlobalTemplate.

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

Referenced by ilExPeerReviewGUI\updateCritAjaxObject().

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

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

436  : string {
437  throw new NotImplementedException();
438  }
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 ILIAS\UICore\GlobalTemplate.

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

368  : void
369  {
370  // Nothing to do
371  }

◆ 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 ILIAS\UICore\GlobalTemplate.

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

342  : void
343  {
344  // Nothing to do
345  }

◆ parseCurrentBlock()

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

Parses the given block.

Implements ILIAS\UICore\GlobalTemplate.

Definition at line 312 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().

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

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

Referenced by printToStdout(), and printToString().

119  : void
120  {
121  $this->gs->layout()->meta()->addCss(ilUtil::getStyleSheetLocation());
122  $this->gs->layout()->meta()->addCss(ilUtil::getNewContentStyleSheetLocation());
123  }
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 98 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().

98  : void
99  {
102  $this->gs->layout()->meta()->addJs("assets/js/Basic.js", true, 1);
105  GlobalPageHandler::initPage($this);
106 
107  $sessionReminder = new ilSessionReminderGUI(
109  $this,
110  $this->lng,
111  $this->logger_factory
112  );
113 
114  $sessionReminder->populatePage();
115  $onScreenNotifier = new ilNotificationOSDGUI($this, $this->lng);
116  $onScreenNotifier->populatePage();
117  }
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
static initializeFrontend(ilGlobalTemplateInterface $page)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutputHeaders()

ilGlobalPageTemplate::prepareOutputHeaders ( )
protected

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

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

Referenced by printToStdout(), and printToString().

73  : void
74  {
75  $this->http->saveResponse(
76  $this->http->response()->withAddedHeader(
77  'P3P',
78  'CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"'
79  )
80  );
81 
82  $this->http->saveResponse(
83  $this->http->response()->withAddedHeader('Content-type', 'text/html; charset=UTF-8')
84  );
85 
86  if (defined("ILIAS_HTTP_PATH")) {
87  $this->gs->layout()->meta()->setBaseURL(
88  (substr(ILIAS_HTTP_PATH, -1) === '/' ? ILIAS_HTTP_PATH : ILIAS_HTTP_PATH . '/')
89  );
90  }
91 
92  $this->gs->layout()->meta()->setTextDirection($this->lng->getTextDirection());
93  }
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 ILIAS\UICore\GlobalTemplate.

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

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

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

Definition at line 143 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().

143  : string
144  {
145  $this->prepareOutputHeaders();
146  $this->prepareBasicJS();
147  $this->prepareBasicCSS();
148 
149  PageContentProvider::setContent($this->legacy_content_template->renderPage(self::DEFAULT_BLOCK, true));
150 
151  return $this->ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
152  }
+ 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 ILIAS\UICore\GlobalTemplate.

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

378  : void
379  {
380  // Nothing to do
381  }

◆ resetJavascript()

ilGlobalPageTemplate::resetJavascript ( )

Reset javascript files.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setAlertProperties()

ilGlobalPageTemplate::setAlertProperties ( array  $alerts)

Set alert properties.

Parameters
array<int,array>$alerts

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setBanner()

ilGlobalPageTemplate::setBanner ( string  $img_src)

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

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

◆ setBodyClass()

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

Sets the body-tags class.

Implements ILIAS\UICore\GlobalTemplate.

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

408  : void
409  {
410  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
411  }
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 ILIAS\UICore\GlobalTemplate.

Definition at line 286 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().

286  : bool
287  {
288  if (in_array($blockname, self::$ignored_blocks)) {
289  return false;
290  }
291 
292  if ($this->blockExists($blockname)) {
293  return $this->legacy_content_template->setCurrentBlock($blockname);
294  }
295  throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
296  }
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 ILIAS\UICore\GlobalTemplate.

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

Referenced by ilExAssignmentEditorGUI\setAssignmentHeader().

209  : void
210  {
211  $this->legacy_content_template->setTitleDesc($a_descr);
212  }
+ 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 ILIAS\UICore\GlobalTemplate.

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

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

◆ setFilter()

ilGlobalPageTemplate::setFilter ( string  $filter)

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

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

◆ setHeaderActionMenu()

ilGlobalPageTemplate::setHeaderActionMenu ( string  $a_header)

Set header action menu.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setHeaderPageTitle()

ilGlobalPageTemplate::setHeaderPageTitle ( string  $a_title)

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

Implements ILIAS\UICore\GlobalTemplate.

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

245  : void
246  {
247  PageContentProvider::setViewTitle($a_title);
248  }

◆ setLeftContent()

ilGlobalPageTemplate::setLeftContent ( string  $a_html)

Sets content of left column.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setLeftNavContent()

ilGlobalPageTemplate::setLeftNavContent ( string  $a_content)

Sets content of left navigation column.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setLocator()

ilGlobalPageTemplate::setLocator ( )

Insert locator.

Implements ILIAS\UICore\GlobalTemplate.

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

347  : void
348  {
349  // Nothing to do
350  }

◆ setLoginTargetPar()

ilGlobalPageTemplate::setLoginTargetPar ( string  $a_val)

Set target parameter for login (public sector).

This is used by the main menu

Implements ILIAS\UICore\GlobalTemplate.

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

383  : void
384  {
385  // Nothing to do
386  }

◆ 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 ILIAS\UICore\GlobalTemplate.

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

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

◆ setPageFormAction()

ilGlobalPageTemplate::setPageFormAction ( string  $a_action)

Sets the pages form action.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ 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 ILIAS\UICore\GlobalTemplate.

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

References ilLink\_getStaticLink().

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

◆ setRightContent()

ilGlobalPageTemplate::setRightContent ( string  $a_html)

Sets content of right column.

Implements ILIAS\UICore\GlobalTemplate.

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

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

184  : void
185  {
186  $this->legacy_content_template->setRightContent($a_html);
187  }
+ Here is the caller graph for this function:

◆ setSubTabs()

ilGlobalPageTemplate::setSubTabs ( string  $a_tabs_html)

sets subtabs in standard template

Implements ILIAS\UICore\GlobalTemplate.

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

423  : void
424  {
425  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
426  }
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 ILIAS\UICore\GlobalTemplate.

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

418  : void
419  {
420  throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
421  }
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 ILIAS\UICore\GlobalTemplate.

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

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

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

◆ setTitleIcon()

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

set title icon

Implements ILIAS\UICore\GlobalTemplate.

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

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

214  : void
215  {
216  $this->legacy_content_template->setIconPath($a_icon_path);
217  $this->legacy_content_template->setIconDesc($a_icon_desc);
218  }
+ 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 ILIAS\UICore\GlobalTemplate.

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

363  : void
364  {
365  // Nothing to do
366  }

◆ setVariable()

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

Sets the given variable to the given value.

Parameters
mixed$value

Implements ILIAS\UICore\GlobalTemplate.

Definition at line 262 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().

262  : void
263  {
264  if ($variable === "LOCATION_CONTENT_STYLESHEET" || $variable === "LOCATION_SYNTAX_STYLESHEET") {
265  $this->addCss($value);
266 
267  return;
268  }
269 
270  $this->legacy_content_template->setVariable(
271  $variable,
272  $this->refinery->kindlyTo()->string()->transform($value)
273  );
274  }
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 ILIAS\UICore\GlobalTemplate.

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

References blockExists().

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

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

◆ $il_settings

ilSetting ilGlobalPageTemplate::$il_settings
protected

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

◆ $legacy_content_template

PageContentGUI ilGlobalPageTemplate::$legacy_content_template
protected

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

◆ $lng

ilLanguage ilGlobalPageTemplate::$lng
protected

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

◆ $logger_factory

ilLoggerFactory ilGlobalPageTemplate::$logger_factory
protected

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

◆ $refinery

Refinery ilGlobalPageTemplate::$refinery
protected

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

◆ $ui

UIServices ilGlobalPageTemplate::$ui
protected

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

Referenced by __construct().


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