ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\UICore\PageContentProvider Class Reference

Class ilPageContentProvider. More...

+ Inheritance diagram for ILIAS\UICore\PageContentProvider:
+ Collaboration diagram for ILIAS\UICore\PageContentProvider:

Public Member Functions

 isInterestedInContexts ()
 
 getContentModification (CalledContexts $screen_context_stack)
 
 getTitleModification (CalledContexts $screen_context_stack)
 
 getShortTitleModification (CalledContexts $screen_context_stack)
 
 getViewTitleModification (CalledContexts $screen_context_stack)
 
 getFooterModification (CalledContexts $screen_context_stack)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider
 __construct (Container $dic)
 
 getContentModification (CalledContexts $screen_context_stack)
 
 getLogoModification (CalledContexts $screen_context_stack)
 
 getResponsiveLogoModification (CalledContexts $screen_context_stack)
 
 getMainBarModification (CalledContexts $screen_context_stack)
 
 getMetaBarModification (CalledContexts $screen_context_stack)
 
 getBreadCrumbsModification (CalledContexts $screen_context_stack)
 
 getFooterModification (CalledContexts $screen_context_stack)
 
 getPageBuilderDecorator (CalledContexts $screen_context_stack)
 
 getTitleModification (CalledContexts $screen_context_stack)
 
 getShortTitleModification (CalledContexts $screen_context_stack)
 
 getViewTitleModification (CalledContexts $screen_context_stack)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 

Static Public Member Functions

static setContent (string $content)
 
static setTitle (string $title)
 
static setShortTitle (string $short_title)
 
static setViewTitle (string $view_title)
 
static setPermaLink (string $perma_link)
 

Static Private Attributes

static $content = ""
 
static $perma_link = ""
 
static $title = ""
 
static $short_title = ""
 
static $view_title = ""
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider
 $context_collection
 
 $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

Class ilPageContentProvider.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de

Definition at line 39 of file PageContentProvider.php.

Member Function Documentation

◆ getContentModification()

ILIAS\UICore\PageContentProvider::getContentModification ( CalledContexts  $screen_context_stack)

Implements ILIAS\GlobalScreen\Scope\Layout\Provider\ModificationProvider.

Definition at line 117 of file PageContentProvider.php.

References ILIAS\UICore\PageContentProvider\$content, and ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen().

117  : ?ContentModification
118  {
119  return $this->globalScreen()->layout()->factory()->content()->withModification(function (?Legacy $content) : ?Legacy {
120  if ($content === null) {
121  return null;
122  }
123  $ui = $this->dic->ui();
124  return $ui->factory()->legacy(
125  $ui->renderer()->render($content) . self::$content
126  );
127  })->withLowPriority();
128  }
+ Here is the call graph for this function:

◆ getFooterModification()

ILIAS\UICore\PageContentProvider::getFooterModification ( CalledContexts  $screen_context_stack)

Implements ILIAS\GlobalScreen\Scope\Layout\Provider\ModificationProvider.

Definition at line 161 of file PageContentProvider.php.

References Vendor\Package\$f, ilObjLanguageAccess\_checkTranslate(), ilLink\_getStaticLink(), ilObjLanguageAccess\_getTranslationLink(), ilObjLanguageAccess\_isPageTranslation(), ilSystemSupportContactsGUI\getFooterLink(), ilAccessibilitySupportContactsGUI\getFooterLink(), ilAccessibilityControlConceptGUI\getFooterLink(), ilSystemSupportContactsGUI\getFooterText(), ilAccessibilitySupportContactsGUI\getFooterText(), ilAccessibilityControlConceptGUI\getFooterText(), ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), and ilImprint\isActive().

161  : ?FooterModification
162  {
163  return $this->globalScreen()->layout()->factory()->footer()->withModification(function (?Footer $footer = null) : ?Footer {
164  $f = $this->dic->ui()->factory();
165 
166  $links = [];
167  // ILIAS Version and Text
168  $ilias_version = $this->dic->settings()->get('ilias_version');
169  $text = "powered by ILIAS (v{$ilias_version})";
170 
171  // Imprint
172  if ($_REQUEST["baseClass"] !== "ilImprintGUI" && \ilImprint::isActive()) {
173  $imprint_title = $this->dic->language()->txt("imprint");
174  $imprint_url = \ilLink::_getStaticLink(0, "impr");
175  $links[] = $f->link()->standard($imprint_title, $imprint_url);
176  }
177 
178  // system support contacts
179  if (($system_support_url = \ilSystemSupportContactsGUI::getFooterLink()) !== '') {
180  $system_support_title = \ilSystemSupportContactsGUI::getFooterText();
181  $links[] = $f->link()->standard($system_support_title, $system_support_url);
182  }
183 
184  // output translation link
186  $translation_url = \ilObjLanguageAccess::_getTranslationLink();
187  $translation_title = $this->dic->language()->txt('translation');
188  $links[] = $f->link()->standard($translation_title, $translation_url)->withOpenInNewViewport(true);
189  }
190 
191  // accessibility control concept
192  if (($accessibility_control_url = \ilAccessibilityControlConceptGUI::getFooterLink()) !== '') {
193  $accessibility_control_title = \ilAccessibilityControlConceptGUI::getFooterText();
194  $links[] = $f->link()->standard($accessibility_control_title, $accessibility_control_url);
195  }
196 
197  // report accessibility issue
198  if (($accessibility_report_url = \ilAccessibilitySupportContactsGUI::getFooterLink()) !== '') {
199  $accessibility_report_title = \ilAccessibilitySupportContactsGUI::getFooterText();
200  $links[] = $f->link()->standard($accessibility_report_title, $accessibility_report_url);
201  }
202 
203  $footer = $f->mainControls()->footer($links, $text);
204 
205  $tosWithdrawalGui = new \ilTermsOfServiceWithdrawalGUIHelper($this->dic->user());
206  $footer = $tosWithdrawalGui->modifyFooter($footer);
207 
208  if (self::$perma_link !== "") {
209  $footer = $footer->withPermanentURL(new URI(self::$perma_link));
210  }
211 
212  return $footer;
213  });
214  }
static _isPageTranslation()
Check if the current request is a page translation.
static _getTranslationLink()
Get the link to translate the current page.
static _checkTranslate()
Permission check for translations.
static isActive()
+ Here is the call graph for this function:

◆ getShortTitleModification()

ILIAS\UICore\PageContentProvider::getShortTitleModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
ShortTitleModification|null

Implements ILIAS\GlobalScreen\Scope\Layout\Provider\ModificationProvider.

Definition at line 140 of file PageContentProvider.php.

References ILIAS\UICore\PageContentProvider\$content, and ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen().

140  : ?ShortTitleModification
141  {
142  return $this->globalScreen()->layout()->factory()->short_title()->withModification(
143  function (?string $content) : string {
144  return self::$short_title;
145  }
146  )->withLowPriority();
147  }
+ Here is the call graph for this function:

◆ getTitleModification()

ILIAS\UICore\PageContentProvider::getTitleModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
TitleModification|null

Implements ILIAS\GlobalScreen\Scope\Layout\Provider\ModificationProvider.

Definition at line 131 of file PageContentProvider.php.

References ILIAS\UICore\PageContentProvider\$content, and ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen().

131  : ?TitleModification
132  {
133  return $this->globalScreen()->layout()->factory()->title()->withModification(
134  function (?string $content) : string {
135  return self::$title;
136  }
137  )->withLowPriority();
138  }
+ Here is the call graph for this function:

◆ getViewTitleModification()

ILIAS\UICore\PageContentProvider::getViewTitleModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
ViewTitleModification|null

Implements ILIAS\GlobalScreen\Scope\Layout\Provider\ModificationProvider.

Definition at line 149 of file PageContentProvider.php.

References ILIAS\UICore\PageContentProvider\$content, and ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen().

149  : ?ViewTitleModification
150  {
151  return $this->globalScreen()->layout()->factory()->view_title()->withModification(
152  function (?string $content) : string {
153  return self::$view_title;
154  }
155  )->withLowPriority();
156  }
+ Here is the call graph for this function:

◆ isInterestedInContexts()

ILIAS\UICore\PageContentProvider::isInterestedInContexts ( )

Implements ILIAS\GlobalScreen\ScreenContext\ScreenContextAwareProvider.

Definition at line 108 of file PageContentProvider.php.

References ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\main().

108  : ContextCollection
109  {
110  return $this->context_collection->main();
111  }
+ Here is the call graph for this function:

◆ setContent()

static ILIAS\UICore\PageContentProvider::setContent ( string  $content)
static
Parameters
string$content

Definition at line 66 of file PageContentProvider.php.

References ILIAS\UICore\PageContentProvider\$content.

66  : void
67  {
68  self::$content = $content;
69  }

◆ setPermaLink()

static ILIAS\UICore\PageContentProvider::setPermaLink ( string  $perma_link)
static
Parameters
string$perma_link

Definition at line 99 of file PageContentProvider.php.

References ILIAS\UICore\PageContentProvider\$perma_link.

99  : void
100  {
101  self::$perma_link = $perma_link;
102  }

◆ setShortTitle()

static ILIAS\UICore\PageContentProvider::setShortTitle ( string  $short_title)
static
Parameters
string$content

Definition at line 82 of file PageContentProvider.php.

References ILIAS\UICore\PageContentProvider\$short_title.

82  : void
83  {
84  self::$short_title = $short_title;
85  }

◆ setTitle()

static ILIAS\UICore\PageContentProvider::setTitle ( string  $title)
static
Parameters
string$content

Definition at line 74 of file PageContentProvider.php.

References ILIAS\UICore\PageContentProvider\$title.

74  : void
75  {
76  self::$title = $title;
77  }

◆ setViewTitle()

static ILIAS\UICore\PageContentProvider::setViewTitle ( string  $view_title)
static
Parameters
string$content

Definition at line 90 of file PageContentProvider.php.

References ILIAS\UICore\PageContentProvider\$view_title.

90  : void
91  {
92  self::$view_title = $view_title;
93  }

Field Documentation

◆ $content

◆ $perma_link

ILIAS\UICore\PageContentProvider::$perma_link = ""
staticprivate

◆ $short_title

ILIAS\UICore\PageContentProvider::$short_title = ""
staticprivate

◆ $title

ILIAS\UICore\PageContentProvider::$title = ""
staticprivate

Definition at line 53 of file PageContentProvider.php.

Referenced by ILIAS\UICore\PageContentProvider\setTitle().

◆ $view_title

ILIAS\UICore\PageContentProvider::$view_title = ""
staticprivate

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