ILIAS  release_8 Revision v8.24
ilTestPlayerLayoutProvider Class Reference
+ Inheritance diagram for ilTestPlayerLayoutProvider:
+ Collaboration diagram for ilTestPlayerLayoutProvider:

Public Member Functions

 isInterestedInContexts ()
 
 getLogoModification (CalledContexts $called_contexts)
 @inheritDoc More...
 
 getResponsiveLogoModification (CalledContexts $called_contexts)
 
 getMainBarModification (CalledContexts $called_contexts)
 @inheritDoc More...
 
 getMetaBarModification (CalledContexts $called_contexts)
 @inheritDoc More...
 
 getFooterModification (CalledContexts $called_contexts)
 @inheritDoc More...
 
 getShortTitleModification (CalledContexts $called_contexts)
 @inheritDoc More...
 
 getViewTitleModification (CalledContexts $called_contexts)
 @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 ()
 

Data Fields

const TEST_PLAYER_KIOSK_MODE_ENABLED = 'test_player_kiosk_mode_enabled'
 
const TEST_PLAYER_TITLE = 'test_player_title'
 
const TEST_PLAYER_SHORT_TITLE = 'test_player_instance_name'
 

Protected Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider
ContextCollection $context_collection
 
ILIAS GlobalScreen Scope Layout Factory ModificationFactory $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
Container $dic
 

Detailed Description

Definition at line 42 of file class.ilTestPlayerLayoutProvider.php.

Member Function Documentation

◆ getFooterModification()

ilTestPlayerLayoutProvider::getFooterModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 113 of file class.ilTestPlayerLayoutProvider.php.

114 {
115 if ($this->isKioskModeEnabled($called_contexts)) {
116 $footer = $this->globalScreen()->layout()->factory()->footer();
117
118 $footer = $footer->withModification(function (?Footer $current): ?Footer {
119 return null;
120 });
121
122 return $footer->withHighPriority();
123 }
124
125 return null;
126 }
isKioskModeEnabled(CalledContexts $called_contexts)
This describes the Footer.
Definition: Footer.php:33

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

+ Here is the call graph for this function:

◆ getLogoModification()

ilTestPlayerLayoutProvider::getLogoModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 54 of file class.ilTestPlayerLayoutProvider.php.

55 {
56 if ($this->isKioskModeEnabled($called_contexts)) {
57 $logo = $this->globalScreen()->layout()->factory()->logo();
58
59 $logo = $logo->withModification(function (?Image $current): ?Image {
60 return null;
61 });
62
63 return $logo->withHighPriority();
64 }
65
66 return null;
67 }

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

+ Here is the call graph for this function:

◆ getMainBarModification()

ilTestPlayerLayoutProvider::getMainBarModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 83 of file class.ilTestPlayerLayoutProvider.php.

84 {
85 if ($this->isKioskModeEnabled($called_contexts)) {
86 $mainBar = $this->globalScreen()->layout()->factory()->mainbar();
87
88 $mainBar = $mainBar->withModification(function (?MainBar $current): ?MainBar {
89 return null;
90 });
91
92 return $mainBar->withHighPriority();
93 }
94
95 return null;
96 }
This describes the MainBar.
Definition: MainBar.php:34

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

+ Here is the call graph for this function:

◆ getMetaBarModification()

ilTestPlayerLayoutProvider::getMetaBarModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 98 of file class.ilTestPlayerLayoutProvider.php.

99 {
100 if ($this->isKioskModeEnabled($called_contexts)) {
101 $metaBar = $this->globalScreen()->layout()->factory()->metabar();
102
103 $metaBar = $metaBar->withModification(function (?MetaBar $current): ?MetaBar {
104 return null;
105 });
106
107 return $metaBar->withHighPriority();
108 }
109
110 return null;
111 }
This describes the MetaBar.
Definition: MetaBar.php:33

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

+ Here is the call graph for this function:

◆ getResponsiveLogoModification()

ilTestPlayerLayoutProvider::getResponsiveLogoModification ( CalledContexts  $called_contexts)

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

Definition at line 68 of file class.ilTestPlayerLayoutProvider.php.

69 {
70 if ($this->isKioskModeEnabled($called_contexts)) {
71 $logo = $this->globalScreen()->layout()->factory()->logo();
72
73 $logo = $logo->withModification(function (?Image $current): ?Image {
74 return null;
75 });
76
77 return $logo->withHighPriority();
78 }
79
80 return null;
81 }

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

+ Here is the call graph for this function:

◆ getShortTitleModification()

ilTestPlayerLayoutProvider::getShortTitleModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 136 of file class.ilTestPlayerLayoutProvider.php.

137 {
138 if ($this->isKioskModeEnabled($called_contexts)) {
139 $title = $called_contexts->current()->getAdditionalData()->get(self::TEST_PLAYER_SHORT_TITLE);
140 if($title == null) {
141 $title = '';
142 }
143 return $this->globalScreen()->layout()->factory()->short_title()
144 ->withModification(
145 function (?string $content) use ($title): ?string {
146 return $title;
147 }
148 )
149 ->withHighPriority();
150 }
151 return null;
152 }

References ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), and isKioskModeEnabled().

+ Here is the call graph for this function:

◆ getViewTitleModification()

ilTestPlayerLayoutProvider::getViewTitleModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 154 of file class.ilTestPlayerLayoutProvider.php.

155 {
156 if ($called_contexts->current()->getAdditionalData()->exists(self::TEST_PLAYER_TITLE)) {
157 $title = $called_contexts->current()->getAdditionalData()->get(self::TEST_PLAYER_TITLE);
158 if($title == null) {
159 $title = '';
160 }
161 return $this->globalScreen()->layout()->factory()->view_title()
162 ->withModification(
163 function (?string $content) use ($title): ?string {
164 return $title;
165 }
166 )
167 ->withHighPriority();
168 }
169 return null;
170 }

References ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), and ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen().

+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilTestPlayerLayoutProvider::isInterestedInContexts ( )

◆ isKioskModeEnabled()

ilTestPlayerLayoutProvider::isKioskModeEnabled ( CalledContexts  $called_contexts)
protected

Definition at line 128 of file class.ilTestPlayerLayoutProvider.php.

128 : bool
129 {
130 $additionalData = $called_contexts->current()->getAdditionalData();
131 $isKioskModeEnabled = $additionalData->is(self::TEST_PLAYER_KIOSK_MODE_ENABLED, true);
132
133 return $isKioskModeEnabled;
134 }

References ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current().

Referenced by getFooterModification(), getLogoModification(), getMainBarModification(), getMetaBarModification(), getResponsiveLogoModification(), and getShortTitleModification().

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

Field Documentation

◆ TEST_PLAYER_KIOSK_MODE_ENABLED

const ilTestPlayerLayoutProvider::TEST_PLAYER_KIOSK_MODE_ENABLED = 'test_player_kiosk_mode_enabled'

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

Referenced by ilTestOutputGUI\executeCommand().

◆ TEST_PLAYER_SHORT_TITLE

const ilTestPlayerLayoutProvider::TEST_PLAYER_SHORT_TITLE = 'test_player_instance_name'

Definition at line 46 of file class.ilTestPlayerLayoutProvider.php.

Referenced by ilTestOutputGUI\executeCommand().

◆ TEST_PLAYER_TITLE


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