ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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_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)
Parameters
CalledContexts$screen_context_stack
Returns
FooterModification|null

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

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

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

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:32
+ 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 54 of file class.ilTestPlayerLayoutProvider.php.

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

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  }
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 83 of file class.ilTestPlayerLayoutProvider.php.

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

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:33
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 98 of file class.ilTestPlayerLayoutProvider.php.

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

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  }
isKioskModeEnabled(CalledContexts $called_contexts)
This describes the MetaBar.
Definition: MetaBar.php:32
+ Here is the call graph for this function:

◆ getResponsiveLogoModification()

ilTestPlayerLayoutProvider::getResponsiveLogoModification ( CalledContexts  $called_contexts)

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

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

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

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  }
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 136 of file class.ilTestPlayerLayoutProvider.php.

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

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  }
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 154 of file class.ilTestPlayerLayoutProvider.php.

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

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

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

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

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  }
+ 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: