ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLSViewLayoutProvider Class Reference

Class ilLSViewLayoutProvider. More...

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

Public Member Functions

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

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)
Parameters
CalledContexts$screen_context_stack
Returns
BreadCrumbsModification|null

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

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

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

86  {
87  if (!$this->isKioskModeEnabled($screen_context_stack)) {
88  return null;
89  }
90 
91  return $this->globalScreen()->layout()->factory()->breadcrumbs()
92  ->withModification(
93  function (Breadcrumbs $current) : ?Breadcrumbs {
94  return null;
95  }
96  )
97  ->withHighPriority();
98  }
isKioskModeEnabled(CalledContexts $screen_context_stack)
+ Here is the call graph for this function:

◆ getContentModification()

ilLSViewLayoutProvider::getContentModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
ContentModification

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

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

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

101  {
102  if (!$this->isKioskModeEnabled($screen_context_stack)) {
103  return null;
104  }
105  $html = $this->data_collection->get(\ilLSPlayer::GS_DATA_LS_CONTENT);
106  // TODO: Once we have more control over the content, we could just setContent
107  // in ilObjLearningSequenceLearnerGUI like any other object and later strip
108  // away the header here.
109  return $this->globalScreen()->layout()->factory()->content()
110  ->withModification(
111  function (Legacy $content) use ($html) : Legacy {
112  $ui = $this->dic->ui();
113  return $ui->factory()->legacy($html);
114  }
115  )
116  ->withHighPriority();
117  }
isKioskModeEnabled(CalledContexts $screen_context_stack)
const GS_DATA_LS_CONTENT
+ Here is the call graph for this function:

◆ getMainBarModification()

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

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

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

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

50  {
51  if (!$this->isKioskModeEnabled($screen_context_stack)) {
52  return null;
53  }
54  return $this->globalScreen()->layout()->factory()->mainbar()
55  ->withModification(
56  function (MainBar $mainbar) : ?MainBar {
57  $mainbar = $mainbar->withClearedEntries();
58  foreach ($this->data_collection->get(\ilLSPlayer::GS_DATA_LS_MAINBARCONTROLS) as $key => $entry) {
59  $mainbar = $mainbar->withAdditionalEntry($key, $entry);
60  }
61  return $mainbar;
62  }
63  )
64  ->withHighPriority();
65  }
This describes the MainBar.
Definition: MainBar.php:15
isKioskModeEnabled(CalledContexts $screen_context_stack)
withClearedEntries()
Get a copy of this Mainbar without any entries.
withAdditionalEntry(string $id, $entry)
Append an entry.
const GS_DATA_LS_MAINBARCONTROLS
+ Here is the call graph for this function:

◆ getMetaBarModification()

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

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

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

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

68  {
69  if (!$this->isKioskModeEnabled($screen_context_stack)) {
70  return null;
71  }
72  return $this->globalScreen()->layout()->factory()->metabar()
73  ->withModification(
74  function (MetaBar $metabar) : ?Metabar {
75  $metabar = $metabar->withClearedEntries();
76  foreach ($this->data_collection->get(\ilLSPlayer::GS_DATA_LS_METABARCONTROLS) as $key => $entry) {
77  $metabar = $metabar->withAdditionalEntry($key, $entry);
78  }
79  return $metabar;
80  }
81  )
82  ->withHighPriority();
83  }
withClearedEntries()
Get a copy of this Metabar without any entries.
withAdditionalEntry(string $id, $entry)
Append an entry.
isKioskModeEnabled(CalledContexts $screen_context_stack)
This describes the MetaBar.
Definition: MetaBar.php:14
const GS_DATA_LS_METABARCONTROLS
+ 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 43 of file class.ilLSViewLayoutProvider.php.

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

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

43  : bool
44  {
45  $this->data_collection = $screen_context_stack->current()->getAdditionalData();
46  return $this->data_collection->is(\ilLSPlayer::GS_DATA_LS_KIOSK_MODE, true);
47  }
const GS_DATA_LS_KIOSK_MODE
+ 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 28 of file class.ilLSViewLayoutProvider.php.


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