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 ()
 @inheritDoc More...
 
 getContentModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getTitleModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getShortTitleModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getViewTitleModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getFooterModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getContentModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getLogoModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getResponsiveLogoModification (CalledContexts $screen_context_stack)
 
 getMainBarModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getMetaBarModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getBreadCrumbsModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getFooterModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getPageBuilderDecorator (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getTitleModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getShortTitleModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getViewTitleModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 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)
 
 isInterestedInContexts ()
 

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)

@inheritDoc

Reimplemented from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider.

Definition at line 117 of file PageContentProvider.php.

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 }
legacy()
Definition: legacy.php:3

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

+ Here is the call graph for this function:

◆ getFooterModification()

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

@inheritDoc

Reimplemented from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider.

Definition at line 161 of file PageContentProvider.php.

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
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 isActive()
static _checkTranslate()
Permission check for translations.
static _isPageTranslation()
Check if the current request is a page translation.
static _getTranslationLink()
Get the link to translate the current page.

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

+ Here is the call graph for this function:

◆ getShortTitleModification()

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

@inheritDoc

Reimplemented from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider.

Definition at line 140 of file PageContentProvider.php.

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 }

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

+ Here is the call graph for this function:

◆ getTitleModification()

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

@inheritDoc

Reimplemented from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider.

Definition at line 131 of file PageContentProvider.php.

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

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

+ Here is the call graph for this function:

◆ getViewTitleModification()

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

@inheritDoc

Reimplemented from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider.

Definition at line 149 of file PageContentProvider.php.

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 }

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

+ Here is the call graph for this function:

◆ isInterestedInContexts()

ILIAS\UICore\PageContentProvider::isInterestedInContexts ( )

@inheritDoc

Implements ILIAS\GlobalScreen\ScreenContext\ScreenContextAwareProvider.

Definition at line 108 of file PageContentProvider.php.

108 : ContextCollection
109 {
110 return $this->context_collection->main();
111 }

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

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

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

References ILIAS\UICore\PageContentProvider\$content.

◆ setPermaLink()

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

Definition at line 99 of file PageContentProvider.php.

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

References ILIAS\UICore\PageContentProvider\$perma_link.

◆ setShortTitle()

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

Definition at line 82 of file PageContentProvider.php.

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

References ILIAS\UICore\PageContentProvider\$short_title.

◆ setTitle()

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

Definition at line 74 of file PageContentProvider.php.

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

References ILIAS\UICore\PageContentProvider\$title.

◆ setViewTitle()

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

Definition at line 90 of file PageContentProvider.php.

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

References ILIAS\UICore\PageContentProvider\$view_title.

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

◆ $view_title

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

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