ILIAS  release_7 Revision v7.30-3-g800a261c036
ilTestPlayerLayoutProvider Class Reference
+ Inheritance diagram for ilTestPlayerLayoutProvider:
+ Collaboration diagram for ilTestPlayerLayoutProvider:

Public Member Functions

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

Data Fields

const TEST_PLAYER_KIOSK_MODE_ENABLED = 'test_player_kiosk_mode_enabled'
 
const TEST_PLAYER_TITLE = 'test_player_kiosk_mode_title'
 
const TEST_PLAYER_SHORT_TITLE = 'test_player_kiosk_mode_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
 $context_collection
 
 $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

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

Member Function Documentation

◆ getFooterModification()

ilTestPlayerLayoutProvider::getFooterModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
FooterModification|null

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

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

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

118  {
119  if ($this->isKioskModeEnabled($called_contexts)) {
120  $footer = $this->globalScreen()->layout()->factory()->footer();
121 
122  $footer = $footer->withModification(function (?Footer $current) : ?Footer {
123  return null;
124  });
125 
126  return $footer->withHighPriority();
127  }
128 
129  return null;
130  }
isKioskModeEnabled(CalledContexts $called_contexts)
This describes the Footer.
Definition: Footer.php:15
+ Here is the call graph for this function:

◆ getLogoModification()

ilTestPlayerLayoutProvider::getLogoModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
LogoModification|null

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

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

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

56  {
57  if ($this->isKioskModeEnabled($called_contexts)) {
58  $logo = $this->globalScreen()->layout()->factory()->logo();
59 
60  $logo = $logo->withModification(function (?Image $current) : ?Image {
61  return null;
62  });
63 
64  return $logo->withHighPriority();
65  }
66 
67  return null;
68  }
isKioskModeEnabled(CalledContexts $called_contexts)
+ Here is the call graph for this function:

◆ getMainBarModification()

ilTestPlayerLayoutProvider::getMainBarModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
MainBarModification|null

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

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

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

86  {
87  if ($this->isKioskModeEnabled($called_contexts)) {
88  $mainBar = $this->globalScreen()->layout()->factory()->mainbar();
89 
90  $mainBar = $mainBar->withModification(function (?MainBar $current) : ?MainBar {
91  return null;
92  });
93 
94  return $mainBar->withHighPriority();
95  }
96 
97  return null;
98  }
This describes the MainBar.
Definition: MainBar.php:16
isKioskModeEnabled(CalledContexts $called_contexts)
+ Here is the call graph for this function:

◆ getMetaBarModification()

ilTestPlayerLayoutProvider::getMetaBarModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
MetaBarModification|null

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

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

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

102  {
103  if ($this->isKioskModeEnabled($called_contexts)) {
104  $metaBar = $this->globalScreen()->layout()->factory()->metabar();
105 
106  $metaBar = $metaBar->withModification(function (?MetaBar $current) : ?MetaBar {
107  return null;
108  });
109 
110  return $metaBar->withHighPriority();
111  }
112 
113  return null;
114  }
isKioskModeEnabled(CalledContexts $called_contexts)
This describes the MetaBar.
Definition: MetaBar.php:14
+ Here is the call graph for this function:

◆ getResponsiveLogoModification()

ilTestPlayerLayoutProvider::getResponsiveLogoModification ( CalledContexts  $called_contexts)

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

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

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

70  {
71  if ($this->isKioskModeEnabled($called_contexts)) {
72  $logo = $this->globalScreen()->layout()->factory()->logo();
73 
74  $logo = $logo->withModification(function (?Image $current) : ?Image {
75  return null;
76  });
77 
78  return $logo->withHighPriority();
79  }
80 
81  return null;
82  }
isKioskModeEnabled(CalledContexts $called_contexts)
+ Here is the call graph for this function:

◆ getShortTitleModification()

ilTestPlayerLayoutProvider::getShortTitleModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
ShortTitleModification|null

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

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

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

148  {
149  if ($this->isKioskModeEnabled($called_contexts)) {
150  $title = $called_contexts->current()->getAdditionalData()->get(self::TEST_PLAYER_SHORT_TITLE);
151  if ($title === null) {
152  $title = '';
153  }
154  return $this->globalScreen()->layout()->factory()->short_title()
155  ->withModification(
156  function (?string $content) use ($title) : ?string {
157  return $title;
158  }
159  )
160  ->withHighPriority();
161  }
162  return null;
163  }
isKioskModeEnabled(CalledContexts $called_contexts)
+ Here is the call graph for this function:

◆ getViewTitleModification()

ilTestPlayerLayoutProvider::getViewTitleModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
ViewTitleModification|null

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

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

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

166  {
167  if ($this->isKioskModeEnabled($called_contexts)) {
168  $title = $called_contexts->current()->getAdditionalData()->get(self::TEST_PLAYER_TITLE);
169  if ($title === null) {
170  $title = '';
171  }
172  return $this->globalScreen()->layout()->factory()->view_title()
173  ->withModification(
174  function (?string $content) use ($title) : ?string {
175  return $title;
176  }
177  )
178  ->withHighPriority();
179  }
180  return null;
181  }
isKioskModeEnabled(CalledContexts $called_contexts)
+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilTestPlayerLayoutProvider::isInterestedInContexts ( )

◆ isKioskModeEnabled()

ilTestPlayerLayoutProvider::isKioskModeEnabled ( CalledContexts  $called_contexts)
protected
Parameters
CalledContexts$called_contexts
Returns
bool

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

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

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

138  : bool
139  {
140  $additionalData = $called_contexts->current()->getAdditionalData();
141  $isKioskModeEnabled = $additionalData->is(self::TEST_PLAYER_KIOSK_MODE_ENABLED, true);
142 
143  return $isKioskModeEnabled;
144  }
+ 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'

◆ TEST_PLAYER_SHORT_TITLE

const ilTestPlayerLayoutProvider::TEST_PLAYER_SHORT_TITLE = 'test_player_kiosk_mode_instance_name'

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

Referenced by ilTestOutputGUI\executeCommand().

◆ TEST_PLAYER_TITLE

const ilTestPlayerLayoutProvider::TEST_PLAYER_TITLE = 'test_player_kiosk_mode_title'

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

Referenced by ilTestOutputGUI\executeCommand().


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