ILIAS  release_7 Revision v7.30-3-g800a261c036
ilLSViewLayoutProvider Class Reference

Class ilLSViewLayoutProvider. More...

+ Inheritance diagram for ilLSViewLayoutProvider:
+ Collaboration diagram for ilLSViewLayoutProvider:

Public Member Functions

 isInterestedInContexts ()
 @inheritDoc More...
 
 getMainBarModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getMetaBarModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getBreadCrumbsModification (CalledContexts $screen_context_stack)
 @inheritDoc More...
 
 getContentModification (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 ()
 

Protected Member Functions

 isKioskModeEnabled (CalledContexts $screen_context_stack)
 
- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 

Protected Attributes

 $data_collection
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider
 $context_collection
 
 $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

Member Function Documentation

◆ getBreadCrumbsModification()

ilLSViewLayoutProvider::getBreadCrumbsModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 114 of file class.ilLSViewLayoutProvider.php.

115 {
116 if (!$this->isKioskModeEnabled($screen_context_stack)) {
117 return null;
118 }
119
120 return $this->globalScreen()->layout()->factory()->breadcrumbs()
121 ->withModification(
122 function (?Breadcrumbs $current) : ?Breadcrumbs {
123 return null;
124 }
125 )
126 ->withHighPriority();
127 }
isKioskModeEnabled(CalledContexts $screen_context_stack)

References ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), and isKioskModeEnabled().

+ Here is the call graph for this function:

◆ getContentModification()

ilLSViewLayoutProvider::getContentModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 129 of file class.ilLSViewLayoutProvider.php.

130 {
131 if (!$this->isKioskModeEnabled($screen_context_stack)) {
132 return null;
133 }
134 $html = $this->data_collection->get(\ilLSPlayer::GS_DATA_LS_CONTENT);
135 // TODO: Once we have more control over the content, we could just setContent
136 // in ilObjLearningSequenceLearnerGUI like any other object and later strip
137 // away the header here.
138 return $this->globalScreen()->layout()->factory()->content()
139 ->withModification(
140 function (?Legacy $content) use ($html) : Legacy {
141 $ui = $this->dic->ui();
142 return $ui->factory()->legacy($html);
143 }
144 )
145 ->withHighPriority();
146 }
const GS_DATA_LS_CONTENT
legacy()
Definition: legacy.php:3

References ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), ilLSPlayer\GS_DATA_LS_CONTENT, isKioskModeEnabled(), and legacy().

+ Here is the call graph for this function:

◆ getMainBarModification()

ilLSViewLayoutProvider::getMainBarModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 65 of file class.ilLSViewLayoutProvider.php.

66 {
67 if (!$this->isKioskModeEnabled($screen_context_stack)) {
68 return null;
69 }
70 return $this->globalScreen()->layout()->factory()->mainbar()
71 ->withModification(
72 function (?MainBar $mainbar) : ?MainBar {
73 if ($mainbar === null) {
74 $ui = $this->dic->ui();
75 $mainbar = $ui->factory()->mainControls()->mainbar();
76 }
77 $entries = $this->data_collection->get(\ilLSPlayer::GS_DATA_LS_MAINBARCONTROLS);
78 $tools = $mainbar->getToolEntries();
79 $mainbar = $mainbar->withClearedEntries();
80
81 foreach ($entries as $key => $entry) {
82 $mainbar = $mainbar->withAdditionalEntry($key, $entry);
83 }
84 foreach ($tools as $key => $entry) {
85 $mainbar = $mainbar->withAdditionalToolEntry($key, $entry);
86 }
87 return $mainbar;
88 }
89 )
90 ->withHighPriority();
91 }
const GS_DATA_LS_MAINBARCONTROLS
This describes the MainBar.
Definition: MainBar.php:17
withClearedEntries()
Get a copy of this Mainbar without any entries.
withAdditionalEntry(string $id, $entry)
Append an entry.
withAdditionalToolEntry(string $id, Slate\Slate $entry, bool $initially_hidden=false, Button\Close $close_button=null)
Append a tool-entry.
mainbar()
Definition: mainbar.php:2

References ILIAS\UI\Component\MainControls\MainBar\getToolEntries(), ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), ilLSPlayer\GS_DATA_LS_MAINBARCONTROLS, isKioskModeEnabled(), mainbar(), ILIAS\UI\Component\MainControls\MainBar\withAdditionalEntry(), ILIAS\UI\Component\MainControls\MainBar\withAdditionalToolEntry(), and ILIAS\UI\Component\MainControls\MainBar\withClearedEntries().

+ Here is the call graph for this function:

◆ getMetaBarModification()

ilLSViewLayoutProvider::getMetaBarModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 93 of file class.ilLSViewLayoutProvider.php.

94 {
95 if (!$this->isKioskModeEnabled($screen_context_stack)) {
96 return null;
97 }
98 return $this->globalScreen()->layout()->factory()->metabar()
99 ->withModification(
100 function (?MetaBar $metabar) : ?Metabar {
101 if ($metabar === null) {
102 return null;
103 }
104 $metabar = $metabar->withClearedEntries();
105 foreach ($this->data_collection->get(\ilLSPlayer::GS_DATA_LS_METABARCONTROLS) as $key => $entry) {
106 $metabar = $metabar->withAdditionalEntry($key, $entry);
107 }
108 return $metabar;
109 }
110 )
111 ->withHighPriority();
112 }
const GS_DATA_LS_METABARCONTROLS
This describes the MetaBar.
Definition: MetaBar.php:15
withClearedEntries()
Get a copy of this Metabar without any entries.

References ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), ilLSPlayer\GS_DATA_LS_METABARCONTROLS, isKioskModeEnabled(), and ILIAS\UI\Component\MainControls\MetaBar\withClearedEntries().

+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilLSViewLayoutProvider::isInterestedInContexts ( )

◆ isKioskModeEnabled()

ilLSViewLayoutProvider::isKioskModeEnabled ( CalledContexts  $screen_context_stack)
protected
Parameters
CalledContexts$calledContexts
Returns
bool

Definition at line 59 of file class.ilLSViewLayoutProvider.php.

59 : bool
60 {
61 $this->data_collection = $screen_context_stack->current()->getAdditionalData();
62 return $this->data_collection->is(\ilLSPlayer::GS_DATA_LS_KIOSK_MODE, true);
63 }
const GS_DATA_LS_KIOSK_MODE

References ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), and ilLSPlayer\GS_DATA_LS_KIOSK_MODE.

Referenced by getBreadCrumbsModification(), getContentModification(), getMainBarModification(), and getMetaBarModification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $data_collection

ilLSViewLayoutProvider::$data_collection
protected

Definition at line 44 of file class.ilLSViewLayoutProvider.php.


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