ILIAS  release_8 Revision v8.23
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...
 
 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...
 

Protected Member Functions

 prepareOutputHeaders ()
 
 prepareBasicJS ()
 
 prepareBasicCSS ()
 

Protected Attributes

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

Static Protected Attributes

static array $ignored_blocks
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References blockExists().

Referenced by ilInfoScreenGUI\getHTML().

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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCss()

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

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

Implements ilGlobalTemplateInterface.

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

Referenced by setVariable().

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

◆ addInlineCss()

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

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

Implements ilGlobalTemplateInterface.

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

Referenced by ilExerciseManagementGUI\initIndividualDeadlineModal().

153  : void
154  {
155  $this->gs->layout()->meta()->addJs($a_js_file, $a_add_version_parameter, $a_batch);
156  }
+ 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.

Referenced by ilExerciseManagementGUI\initIndividualDeadlineModal().

163  : void
164  {
165  $this->gs->layout()->meta()->addOnloadCode($a_code, $a_batch);
166  }
+ Here is the caller graph for this function:

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

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

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  }
+ Here is the caller graph for this function:

◆ 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  }
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...

◆ get()

◆ getOnLoadCodeForAsynch()

ilGlobalPageTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Implements ilGlobalTemplateInterface.

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

Referenced by ilExerciseManagementGUI\handleIndividualDeadlineCallsObject(), and ilExPeerReviewGUI\updateCritAjaxObject().

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  }
+ Here is the caller graph for this function:

◆ getSpecial()

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

Renders the page with specific elements enabled.

Implements ilGlobalTemplateInterface.

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

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

◆ hideFooter()

ilGlobalPageTemplate::hideFooter ( )

Make the template hide the footer.

Implements ilGlobalTemplateInterface.

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

References blockExists().

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

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

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

Referenced by printToStdout(), and printToString().

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

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

Referenced by printToStdout(), and printToString().

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 initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
static initializeFrontend(ilGlobalTemplateInterface $page)
static init(ilGlobalTemplateInterface $template=null)
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutputHeaders()

ilGlobalPageTemplate::prepareOutputHeaders ( )
protected

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

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

Referenced by printToStdout(), and printToString().

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  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printToStdout()

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

Implements ilGlobalTemplateInterface.

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

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

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 http()
Fetches the global http state from ILIAS.
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
+ Here is the call graph for this function:

◆ printToString()

ilGlobalPageTemplate::printToString ( )

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

Implements ilGlobalTemplateInterface.

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

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

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

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  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetHeaderBlock()

ilGlobalPageTemplate::resetHeaderBlock ( bool  $a_reset_header_action = true)

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

Implements ilGlobalTemplateInterface.

Definition at line 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  }
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...

◆ setContent()

ilGlobalPageTemplate::setContent ( string  $a_html)

Sets content for standard template.

Implements ilGlobalTemplateInterface.

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

Referenced by ilExAssignmentEditorGUI\addAssignmentObject(), ilExerciseManagementGUI\adoptTeamsFromGroupObject(), ilSurveySkillGUI\assignSkillToQuestion(), ilExAssignmentEditorGUI\confirmAssignmentsDeletionObject(), ilExerciseManagementGUI\confirmDeassignMembersObject(), ilExPeerReviewGUI\confirmResetPeerReviewObject(), ilExAssignmentEditorGUI\editAssignmentObject(), ilExPeerReviewGUI\editPeerReviewItemObject(), ilExPeerReviewGUI\editPeerReviewObject(), ilExAssignmentEditorGUI\editPeerReviewObject(), ilInfoScreenGUI\executeCommand(), ILIAS\Wiki\Export\WikiHtmlExport\exportPageHTML(), ilExAssignmentEditorGUI\listAssignmentsObject(), ilSurveySkillGUI\listQuestionAssignment(), ilExerciseManagementGUI\membersObject(), ilExAssignmentEditorGUI\saveAssignmentObject(), ilExPeerReviewGUI\showGivenPeerReviewObject(), ilExerciseManagementGUI\showGradesOverviewObject(), ilExerciseManagementGUI\showMultiFeedbackConfirmationTableObject(), ilExerciseManagementGUI\showMultiFeedbackObject(), ilExerciseManagementGUI\showParticipantObject(), ilExPeerReviewGUI\showPeerReviewOverviewObject(), ilExPeerReviewGUI\showReceivedPeerReviewObject(), ilInfoScreenGUI\showSummary(), ilExAssignmentEditorGUI\updateAssignmentObject(), ilExAssignmentEditorGUI\updatePeerReviewObject(), ILIAS\Notes\Export\NotesHtmlExport\writeExportFile(), and ILIAS\Blog\Export\BlogHtmlExport\writeExportFile().

173  : void
174  {
175  $this->legacy_content_template->setMainContent($a_html);
176  }
+ 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.

References blockExists().

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

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  }
blockExists(string $blockname)
check if block exists in actual template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDescription()

ilGlobalPageTemplate::setDescription ( string  $a_descr)

Sets description below title in standard template.

Implements ilGlobalTemplateInterface.

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

Referenced by ilExAssignmentEditorGUI\setAssignmentHeader().

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

◆ setFileUploadRefId()

ilGlobalPageTemplate::setFileUploadRefId ( int  $a_ref_id)

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

Implements ilGlobalTemplateInterface.

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

Referenced by ilExerciseManagementGUI\showMultiFeedbackObject().

229  : void
230  {
231  $this->legacy_content_template->setOnScreenMessage($a_type, $a_txt, $a_keep);
232  }
+ Here is the caller graph for this function:

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

References ilLink\_getStaticLink().

362  : void {
363  $href = ilLink::_getStaticLink($a_id, $a_type, true, $a_append);
364  PageContentProvider::setPermaLink($href);
365  }
+ Here is the call graph for this function:

◆ setRightContent()

ilGlobalPageTemplate::setRightContent ( string  $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

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

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

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

◆ setSubTabs()

ilGlobalPageTemplate::setSubTabs ( string  $a_tabs_html)

sets subtabs in standard template

Implements ilGlobalTemplateInterface.

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

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

◆ setTabs()

ilGlobalPageTemplate::setTabs ( string  $a_tabs_html)

sets tabs in standard template

Implements ilGlobalTemplateInterface.

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

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

◆ setTitle()

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

Sets title in standard template.

Will override the header_page_title.

Implements ilGlobalTemplateInterface.

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

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

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  }
+ Here is the caller graph for this function:

◆ setTitleIcon()

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

set title icon

Implements ilGlobalTemplateInterface.

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

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

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

◆ setTreeFlatIcon()

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

Sets a tree or flat icon.

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

Implements ilGlobalTemplateInterface.

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

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

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

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

References blockExists().

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

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  }
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 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:
= [
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.

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