ILIAS  release_8 Revision v8.24
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...
 
 addLightbox (string $a_html, string $a_id)
 Add a lightbox html to the template. 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...
 
 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...
 
 addLightbox (string $a_html, string $a_id)
 Add a lightbox html to the template. 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
 
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 
)

@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->http = $http;
67 $this->legacy_content_template = new PageContentGUI("tpl.page_content.html", true, true);
68 $this->il_settings = $DIC->settings();
69 $this->refinery = $DIC->refinery();
70 }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.

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  $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 259 of file class.ilGlobalPageTemplate.php.

259 : void
260 {
261 $this->legacy_content_template->setAdminPanelCommandsToolbar($toolb);
262 $this->legacy_content_template->setAdminPanelArrow($a_arrow);
263 $this->legacy_content_template->setAdminPanelBottom($a_bottom_panel);
264 }

◆ addBlockFile()

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

overwrites ITX::addBlockFile

Implements ilGlobalTemplateInterface.

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

328 : bool
329 {
330 if ($this->blockExists($block)) {
331 $this->legacy_content_template->removeBlockData($block);
332 }
333
334 return $this->legacy_content_template->addBlockFile($var, $block, $template_name, $in_module);
335 }
blockExists(string $blockname)
check if block exists in actual template

◆ 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 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 ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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 }

Referenced by assQuestionGUI\populateJavascriptFilesRequiredForWorkForm().

+ Here is the caller graph for this function:

◆ addLightbox()

ilGlobalPageTemplate::addLightbox ( string  $a_html,
string  $a_id 
)

Add a lightbox html to the template.

Implements ilGlobalTemplateInterface.

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

249 : void
250 {
251 $this->legacy_content_template->addLightbox($a_html, $a_id);
252 }

◆ addOnLoadCode()

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

Add on load code.

Implements ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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

337 : bool
338 {
339 if (in_array($blockname, self::$ignored_blocks)) {
340 return false;
341 }
342
343 return $this->legacy_content_template->blockExists($blockname);
344 }

◆ clearHeader()

ilGlobalPageTemplate::clearHeader ( )

Clear header.

Implements ilGlobalTemplateInterface.

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 }
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 407 of file class.ilGlobalPageTemplate.php.

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

◆ get()

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

Renders the given block and returns the html string.

Implements ilGlobalTemplateInterface.

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

285 : string
286 {
287 return $this->legacy_content_template->get($part);
288 }

Referenced by assQuestionGUI\getPreviousSolutionConfirmationCheckboxHtml(), assQuestionGUI\getUseUnchangedAnswerCheckboxHtml(), assClozeTestGUI\populateQuestionSpecificFormPart(), assLongMenuGUI\populateQuestionSpecificFormPart(), and ilDclRecordEditGUI\searchObjects().

+ Here is the caller graph for this function:

◆ getOnLoadCodeForAsynch()

ilGlobalPageTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Implements ilGlobalTemplateInterface.

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

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

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

440 : string {
441 throw new NotImplementedException();
442 }

◆ hideFooter()

ilGlobalPageTemplate::hideFooter ( )

Make the template hide the footer.

Implements ilGlobalTemplateInterface.

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

372 : void
373 {
374 // Nothing to do
375 }

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

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

◆ parseCurrentBlock()

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

Parses the given block.

Implements ilGlobalTemplateInterface.

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

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

Referenced by assClozeTestGUI\populateQuestionSpecificFormPart(), assLongMenuGUI\populateQuestionSpecificFormPart(), 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="", 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

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

+ Here is the call graph for this function:

◆ prepareBasicJS()

ilGlobalPageTemplate::prepareBasicJS ( )
protected
Exceptions
JsonException

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

97 : void
98 {
101 $this->gs->layout()->meta()->addJs("./Services/JavaScript/js/Basic.js", true, 1);
102 ilUIFramework::init($this);
105 GlobalPageHandler::initPage($this);
106
107 $sessionReminder = new ilSessionReminderGUI(
109 $this,
110 $this->lng
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 init(ilGlobalTemplateInterface $template=null)
static initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template

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

+ Here is the call graph for this function:

◆ prepareOutputHeaders()

ilGlobalPageTemplate::prepareOutputHeaders ( )
protected

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

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

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 ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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

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

◆ resetJavascript()

ilGlobalPageTemplate::resetJavascript ( )

Reset javascript files.

Implements ilGlobalTemplateInterface.

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

280 : void
281 {
282 $this->gs->layout()->meta()->getJs()->clear();
283 }

◆ setAlertProperties()

ilGlobalPageTemplate::setAlertProperties ( array  $alerts)

Set alert properties.

Parameters
array<int,array>$alerts

Implements ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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 }

◆ setContent()

ilGlobalPageTemplate::setContent ( string  $a_html)

Sets content for standard template.

Implements ilGlobalTemplateInterface.

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

173 : void
174 {
175 $this->legacy_content_template->setMainContent($a_html);
176 }

Referenced by ilExAssignmentEditorGUI\addAssignmentObject(), ilSurveySkillGUI\assignSkillToQuestion(), ilExPeerReviewGUI\confirmResetPeerReviewObject(), ilInfoScreenGUI\executeCommand(), ilExAssignmentEditorGUI\listAssignmentsObject(), ilSurveySkillGUI\listQuestionAssignment(), and ilExerciseManagementGUI\membersObject().

+ Here is the caller graph for this function:

◆ setCurrentBlock()

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

Sets the template to the given block.

Implements ilGlobalTemplateInterface.

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

290 : bool
291 {
292 if (in_array($blockname, self::$ignored_blocks)) {
293 return false;
294 }
295
296 if ($this->blockExists($blockname)) {
297 return $this->legacy_content_template->setCurrentBlock($blockname);
298 }
299 throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
300 }

Referenced by ilDclRecordEditGUI\searchObjects().

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

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

◆ setFileUploadRefId()

ilGlobalPageTemplate::setFileUploadRefId ( int  $a_ref_id)

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

Implements ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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

377 : void
378 {
379 // Nothing to do, this should be handled in Slates later
380 }

◆ setLocator()

ilGlobalPageTemplate::setLocator ( )

Insert locator.

Implements ilGlobalTemplateInterface.

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

351 : void
352 {
353 // Nothing to do
354 }

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

387 : void
388 {
389 // Nothing to do
390 }

◆ 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 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 ilGlobalTemplateInterface.

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

254 : void
255 {
256 $this->legacy_content_template->setPageFormAction($a_action);
257 }

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

362 : void {
363 $href = ilLink::_getStaticLink($a_id, $a_type, true, $a_append);
364 PageContentProvider::setPermaLink($href);
365 }

◆ setRightContent()

ilGlobalPageTemplate::setRightContent ( string  $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

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

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

◆ setSubTabs()

ilGlobalPageTemplate::setSubTabs ( string  $a_tabs_html)

sets subtabs in standard template

Implements ilGlobalTemplateInterface.

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

427 : void
428 {
429 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
430 }

◆ setTabs()

ilGlobalPageTemplate::setTabs ( string  $a_tabs_html)

sets tabs in standard template

Implements ilGlobalTemplateInterface.

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 }

◆ 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 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 }

◆ setTitleIcon()

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

set title icon

Implements ilGlobalTemplateInterface.

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 ilGlobalTemplateInterface.

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

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

◆ setVariable()

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

Sets the given variable to the given value.

Parameters
mixed$value

Implements ilGlobalTemplateInterface.

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

266 : void
267 {
268 if ($variable === "LOCATION_CONTENT_STYLESHEET" || $variable === "LOCATION_SYNTAX_STYLESHEET") {
269 $this->addCss($value);
270
271 return;
272 }
273
274 $this->legacy_content_template->setVariable(
275 $variable,
276 $this->refinery->kindlyTo()->string()->transform($value)
277 );
278 }
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 assQuestionGUI\getPreviousSolutionConfirmationCheckboxHtml(), assQuestionGUI\getUseUnchangedAnswerCheckboxHtml(), assClozeTestGUI\populateQuestionSpecificFormPart(), assLongMenuGUI\populateQuestionSpecificFormPart(), 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 ilGlobalTemplateInterface.

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

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

Field Documentation

◆ $gs

Services ilGlobalPageTemplate::$gs
protected

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

Referenced by __construct().

◆ $http

HTTPServices ilGlobalPageTemplate::$http
protected

Definition at line 38 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.

◆ $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: