ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilGlobalPageTemplate Class Reference
+ Inheritance diagram for ilGlobalPageTemplate:
+ Collaboration diagram for ilGlobalPageTemplate:

Public Member Functions

 __construct (Services $gs, UIServices $ui, HTTPServices $http)
 @inheritDoc More...
 
 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
 hideFooter ()
 Make the template hide the footer. More...
 
 setOnScreenMessage (string $type, string $a_txt, bool $a_keep=false)
 Set a message to be displayed to the user. 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...
 
 addOnLoadCode (string $a_code, int $a_batch=2)
 Add on load code. More...
 
 getOnLoadCodeForAsynch ()
 Get js onload code for ajax calls. More...
 
 resetJavascript ()
 Reset javascript files. More...
 
 fillJavaScriptFiles (bool $a_force=false)
 Probably adds javascript files. More...
 
 addCss (string $a_css_file, string $media="screen")
 Add a css file that should be included in the header. More...
 
 addInlineCss (string $a_css, string $media="screen")
 Add a css file that should be included in the header. More...
 
 setBodyClass (string $a_class="")
 Sets the body-tags class. 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...
 
 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...
 
 setAlertProperties (array $alerts)
 Set alert properties. More...
 
 clearHeader ()
 Clear header. More...
 
 setHeaderActionMenu (string $a_header)
 Set header action menu. More...
 
 setHeaderPageTitle (string $a_title)
 Sets the title of the page (for browser window). More...
 
 setLocator ()
 Insert locator. More...
 
 setTabs (string $a_tabs_html)
 sets tabs in standard template More...
 
 setSubTabs (string $a_tabs_html)
 sets subtabs in standard template More...
 
 setContent (string $a_html)
 Sets content for standard template. More...
 
 setLeftContent (string $a_html)
 Sets content of left column. More...
 
 setLeftNavContent (string $a_content)
 Sets content of left navigation column. More...
 
 setRightContent (string $a_html)
 Sets content of right column. More...
 
 setPageFormAction (string $a_action)
 Sets the pages form action. More...
 
 setLoginTargetPar (string $a_val)
 Set target parameter for login (public sector). 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...
 
 printToStdout (string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
 
 printToString ()
 Use this method to get the finally rendered page as string. More...
 
 setTreeFlatIcon (string $a_link, string $a_mode)
 Sets a tree or flat icon. More...
 
 addAdminPanelToolbar (\ilToolbarGUI $toolbar, bool $is_bottom_panel=true, bool $has_arrow=false)
 Add admin panel commands as toolbar. 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...
 
 resetHeaderBlock (bool $a_reset_header_action=true)
 Reset all header properties: title, icon, description, alerts, action menu. More...
 
 setFileUploadRefId (int $a_ref_id)
 Enables the file upload into this object by dropping a file. More...
 
 get (string $part=self::DEFAULT_BLOCK)
 Renders the given block and returns the html string. More...
 
 setVariable (string $variable, $value='')
 Sets the given variable to the given value. More...
 
 setCurrentBlock (string $part=self::DEFAULT_BLOCK)
 Sets the template to the given block. More...
 
 parseCurrentBlock (string $block_name=self::DEFAULT_BLOCK)
 Parses the given block. More...
 
 touchBlock (string $block)
 overwrites ITX::touchBlock. More...
 
 addBlockFile (string $var, string $block, string $template_name, ?string $in_module=null)
 overwrites ITX::addBlockFile More...
 
 blockExists (string $block_name)
 check if block exists in actual template 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 
)

@inheritDoc

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

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

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

+ 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 254 of file class.ilGlobalPageTemplate.php.

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

◆ addBlockFile()

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

overwrites ITX::addBlockFile

Implements ILIAS\UICore\GlobalTemplate.

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

323 : bool
324 {
325 if ($this->blockExists($block)) {
326 $this->legacy_content_template->removeBlockData($block);
327 }
328
329 return $this->legacy_content_template->addBlockFile($var, $block, $template_name, $in_module);
330 }
blockExists(string $blockname)
check if block exists in actual template

Referenced by ilInfoScreenGUI\getHTML().

+ 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 158 of file class.ilGlobalPageTemplate.php.

158 : void
159 {
160 $this->gs->layout()->meta()->addCss($a_css_file, $media);
161 }

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

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

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

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

◆ addOnLoadCode()

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

Add on load code.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ blockExists()

ilGlobalPageTemplate::blockExists ( string  $block_name)

check if block exists in actual template

Parameters
string$block_name

Implements ILIAS\UICore\GlobalTemplate.

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

332 : bool
333 {
334 if (in_array($blockname, self::$ignored_blocks)) {
335 return false;
336 }
337
338 return $this->legacy_content_template->blockExists($blockname);
339 }

◆ clearHeader()

ilGlobalPageTemplate::clearHeader ( )

Clear header.

Implements ILIAS\UICore\GlobalTemplate.

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

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

402 : void
403 {
404 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
405 }

◆ get()

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

Renders the given block and returns the html string.

Implements ILIAS\UICore\GlobalTemplate.

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

280 : string
281 {
282 return $this->legacy_content_template->get($part);
283 }

Referenced by ilInfoScreenGUI\getHTML(), assQuestionGUI\getPreviousSolutionConfirmationCheckboxHtml(), assQuestionGUI\getUseUnchangedAnswerCheckboxHtml(), and ilDclRecordEditGUI\searchObjects().

+ Here is the caller graph for this function:

◆ getOnLoadCodeForAsynch()

ilGlobalPageTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Implements ILIAS\UICore\GlobalTemplate.

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

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

Referenced by ilExPeerReviewGUI\updateCritAjaxObject().

+ 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 427 of file class.ilGlobalPageTemplate.php.

435 : string {
436 throw new NotImplementedException();
437 }

◆ hideFooter()

ilGlobalPageTemplate::hideFooter ( )

Make the template hide the footer.

Implements ILIAS\UICore\GlobalTemplate.

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

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

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

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

◆ parseCurrentBlock()

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

Parses the given block.

Implements ILIAS\UICore\GlobalTemplate.

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

311 : bool
312 {
313 if (in_array($blockname, self::$ignored_blocks)) {
314 return false; // TODO why is this needed?
315 }
316 if ($this->blockExists($blockname)) {
317 return $this->legacy_content_template->parseCurrentBlock($blockname);
318 }
319
320 throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
321 }

Referenced by ilInfoScreenGUI\getHTML(), and ilDclRecordEditGUI\searchObjects().

+ Here is the caller graph for this function:

◆ prepareBasicCSS()

ilGlobalPageTemplate::prepareBasicCSS ( )
protected

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

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

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

+ Here is the call graph for this function:

◆ prepareBasicJS()

ilGlobalPageTemplate::prepareBasicJS ( )
protected
Exceptions
JsonException

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

98 : void
99 {
101 $this->gs->layout()->meta()->addJs("assets/js/Basic.js", true, 1);
104 GlobalPageHandler::initPage($this);
105
106 $sessionReminder = new ilSessionReminderGUI(
108 $this,
109 $this->lng,
110 $this->logger_factory
111 );
112
113 $sessionReminder->populatePage();
114 $onScreenNotifier = new ilNotificationOSDGUI($this, $this->lng);
115 $onScreenNotifier->populatePage();
116 }
static initializeFrontend(ilGlobalTemplateInterface $page)
static initializeFrontend(ilGlobalTemplateInterface $page)
static initjQuery(?ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template

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

+ Here is the call graph for this function:

◆ prepareOutputHeaders()

ilGlobalPageTemplate::prepareOutputHeaders ( )
protected

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

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 }

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

+ Here is the call 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 124 of file class.ilGlobalPageTemplate.php.

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

◆ printToString()

ilGlobalPageTemplate::printToString ( )

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

Implements ILIAS\UICore\GlobalTemplate.

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

142 : string
143 {
144 $this->prepareOutputHeaders();
145 $this->prepareBasicJS();
146 $this->prepareBasicCSS();
147
148 PageContentProvider::setContent($this->legacy_content_template->renderPage(self::DEFAULT_BLOCK, true));
149
150 return $this->ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
151 }

References ILIAS\Repository\ui().

+ Here is the call 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 377 of file class.ilGlobalPageTemplate.php.

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

◆ resetJavascript()

ilGlobalPageTemplate::resetJavascript ( )

Reset javascript files.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setAlertProperties()

ilGlobalPageTemplate::setAlertProperties ( array  $alerts)

Set alert properties.

Parameters
array<int,array>$alerts

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setBanner()

ilGlobalPageTemplate::setBanner ( string  $img_src)

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

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

◆ setBodyClass()

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

Sets the body-tags class.

Implements ILIAS\UICore\GlobalTemplate.

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

407 : void
408 {
409 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
410 }

◆ setContent()

◆ setCurrentBlock()

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

Sets the template to the given block.

Implements ILIAS\UICore\GlobalTemplate.

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

285 : bool
286 {
287 if (in_array($blockname, self::$ignored_blocks)) {
288 return false;
289 }
290
291 if ($this->blockExists($blockname)) {
292 return $this->legacy_content_template->setCurrentBlock($blockname);
293 }
294 throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
295 }

Referenced by ilInfoScreenGUI\getHTML(), and ilDclRecordEditGUI\searchObjects().

+ 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 208 of file class.ilGlobalPageTemplate.php.

208 : void
209 {
210 $this->legacy_content_template->setTitleDesc($a_descr);
211 }

Referenced by ilExAssignmentEditorGUI\setAssignmentHeader().

+ 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 234 of file class.ilGlobalPageTemplate.php.

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

◆ setFilter()

ilGlobalPageTemplate::setFilter ( string  $filter)

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

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

◆ setHeaderActionMenu()

ilGlobalPageTemplate::setHeaderActionMenu ( string  $a_header)

Set header action menu.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setHeaderPageTitle()

ilGlobalPageTemplate::setHeaderPageTitle ( string  $a_title)

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

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setLeftContent()

ilGlobalPageTemplate::setLeftContent ( string  $a_html)

Sets content of left column.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setLeftNavContent()

ilGlobalPageTemplate::setLeftNavContent ( string  $a_content)

Sets content of left navigation column.

Implements ILIAS\UICore\GlobalTemplate.

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

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

◆ setLocator()

ilGlobalPageTemplate::setLocator ( )

Insert locator.

Implements ILIAS\UICore\GlobalTemplate.

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

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

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

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

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

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

◆ setPageFormAction()

ilGlobalPageTemplate::setPageFormAction ( string  $a_action)

Sets the pages form action.

Implements ILIAS\UICore\GlobalTemplate.

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

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

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

357 : void {
358 $href = ilLink::_getStaticLink($a_id, $a_type, true, $a_append);
359 PageContentProvider::setPermaLink($href);
360 }

◆ setRightContent()

ilGlobalPageTemplate::setRightContent ( string  $a_html)

Sets content of right column.

Implements ILIAS\UICore\GlobalTemplate.

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

183 : void
184 {
185 $this->legacy_content_template->setRightContent($a_html);
186 }

Referenced by ilInfoScreenGUI\showSummary().

+ 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 422 of file class.ilGlobalPageTemplate.php.

422 : void
423 {
424 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
425 }

◆ setTabs()

ilGlobalPageTemplate::setTabs ( string  $a_tabs_html)

sets tabs in standard template

Implements ILIAS\UICore\GlobalTemplate.

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

417 : void
418 {
419 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
420 }

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

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

References ilObjSystemFolder\_getHeaderTitle().

Referenced by ilExAssignmentEditorGUI\setAssignmentHeader(), ilExPeerReviewGUI\showGivenPeerReviewObject(), and ilExPeerReviewGUI\showReceivedPeerReviewObject().

+ Here is the call graph for this function:
+ 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 213 of file class.ilGlobalPageTemplate.php.

213 : void
214 {
215 $this->legacy_content_template->setIconPath($a_icon_path);
216 $this->legacy_content_template->setIconDesc($a_icon_desc);
217 }

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

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

◆ setVariable()

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

Sets the given variable to the given value.

Parameters
mixed$value

Implements ILIAS\UICore\GlobalTemplate.

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

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

References ILIAS\Repository\refinery().

Referenced by ilInfoScreenGUI\getHTML(), assQuestionGUI\getPreviousSolutionConfirmationCheckboxHtml(), assQuestionGUI\getUseUnchangedAnswerCheckboxHtml(), and ilDclRecordEditGUI\searchObjects().

+ 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 297 of file class.ilGlobalPageTemplate.php.

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

Referenced by ilInfoScreenGUI\getHTML().

+ 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:
= [
'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: