ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLMHtmlExportViewLayoutProvider Class Reference

LM HTML export view layout provider, hides main and meta bar. More...

+ Inheritance diagram for ilLMHtmlExportViewLayoutProvider:
+ Collaboration diagram for ilLMHtmlExportViewLayoutProvider:

Public Member Functions

 isInterestedInContexts ()
 @inheritDoc More...
 
 getMetaBarModification (CalledContexts $called_contexts)
 No meta bar in HTML exports. More...
 
 getMainBarModification (CalledContexts $called_contexts)
 No main bar in HTML exports. More...
 
 getBreadCrumbsModification (CalledContexts $called_contexts)
 No breadcrumbs in HTML exports. 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 LM_HTML_EXPORT_RENDERING = 'lm_html_export_rendering'
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider
 $context_collection
 
 $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

LM HTML export view layout provider, hides main and meta bar.

Author
killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 19 of file class.ilLMHtmlExportViewLayoutProvider.php.

Member Function Documentation

◆ getBreadCrumbsModification()

ilLMHtmlExportViewLayoutProvider::getBreadCrumbsModification ( CalledContexts  $called_contexts)

No breadcrumbs in HTML exports.

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

Definition at line 102 of file class.ilLMHtmlExportViewLayoutProvider.php.

103 {
104 $additional_data = $called_contexts->current()->getAdditionalData();
105 if ($additional_data->is(self::LM_HTML_EXPORT_RENDERING, true)) {
106 return $this->globalScreen()
107 ->layout()
108 ->factory()
109 ->breadcrumbs()
110 ->withModification(function (Breadcrumbs $current = null) : ?Breadcrumbs {
111 return null;
112 })->withHighPriority();
113 } else {
114 return null;
115 }
116 }

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

+ Here is the call graph for this function:

◆ getMainBarModification()

ilLMHtmlExportViewLayoutProvider::getMainBarModification ( CalledContexts  $called_contexts)

No main bar in HTML exports.

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

Definition at line 53 of file class.ilLMHtmlExportViewLayoutProvider.php.

54 {
55 $additional_data = $called_contexts->current()->getAdditionalData();
56 if ($additional_data->is(self::LM_HTML_EXPORT_RENDERING, true)) {
57 return $this->globalScreen()
58 ->layout()
59 ->factory()
60 ->mainbar()
61 ->withModification(function (MainBar $current = null) : ?MainBar {
62 global $DIC;
63
64 $lng = $DIC->language();
65 $f = $DIC->ui()->factory();
66
67 // create an offline main bar
68 $offline_main_bar = new \ILIAS\UI\Implementation\Component\MainControls\MainBar(
69 new \ILIAS\UI\Implementation\Component\SignalGenerator()
70 );
71 $grid_icon = $f->symbol()->icon()->custom(\ilUtil::getImagePath("outlined/icon_tool.svg"), $lng->txt("more"));
72 $offline_main_bar = $offline_main_bar->withMoreButton(
73 $f->button()->bulky($grid_icon, $lng->txt("more"), "#")
74 );
75 $tools_button = $f->button()->bulky($grid_icon, $lng->txt("tools"), "#")->withEngagedState(true);
76 $offline_main_bar = $offline_main_bar->withToolsButton($tools_button);
77
78 // get tool ids for offline use from lm tools provider
79 $lm_tools = new ilLMGSToolProvider($DIC);
80 $ids = $lm_tools->getOfflineToolIds();
81
82 // copy all offline tools from original main bar to offline main bar
83 foreach ($current->getToolEntries() as $id => $te) {
84 if (in_array($id, $ids)) {
85 $offline_main_bar = $offline_main_bar->withAdditionalToolEntry(
86 $id,
87 $te
88 );
89 }
90 }
91
92 return $offline_main_bar;
93 })->withHighPriority();
94 } else {
95 return null;
96 }
97 }
Class ilLMGSToolProvider.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
This describes the MainBar.
Definition: MainBar.php:16
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.
$lng
$DIC
Definition: xapitoken.php:46

References $DIC, Vendor\Package\$f, $lng, ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), ilUtil\getImagePath(), and ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen().

+ Here is the call graph for this function:

◆ getMetaBarModification()

ilLMHtmlExportViewLayoutProvider::getMetaBarModification ( CalledContexts  $called_contexts)

No meta bar in HTML exports.

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

Definition at line 35 of file class.ilLMHtmlExportViewLayoutProvider.php.

36 {
37 $additional_data = $called_contexts->current()->getAdditionalData();
38 if ($additional_data->is(self::LM_HTML_EXPORT_RENDERING, true)) {
39 return $this->globalScreen()
40 ->layout()
41 ->factory()
42 ->metabar()
43 ->withModification(function (MetaBar $current = null) : ?MetaBar {
44 return null;
45 })->withHighPriority();
46 }
47 return null;
48 }
This describes the MetaBar.
Definition: MetaBar.php:15

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

+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilLMHtmlExportViewLayoutProvider::isInterestedInContexts ( )

Field Documentation

◆ LM_HTML_EXPORT_RENDERING

const ilLMHtmlExportViewLayoutProvider::LM_HTML_EXPORT_RENDERING = 'lm_html_export_rendering'

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