ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 $screen_context_stack)
 No meta bar in HTML exports. More...
 
 getMainBarModification (CalledContexts $screen_context_stack)
 No main bar in HTML exports. More...
 
 getBreadCrumbsModification (CalledContexts $screen_context_stack)
 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 (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 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
ContextCollection $context_collection
 
DataFactory $data
 
ModificationFactory $factory
 

Detailed Description

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

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

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

Member Function Documentation

◆ getBreadCrumbsModification()

ilLMHtmlExportViewLayoutProvider::getBreadCrumbsModification ( CalledContexts  $screen_context_stack)

No breadcrumbs in HTML exports.

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

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

117 {
118 $additional_data = $screen_context_stack->current()->getAdditionalData();
119 if ($additional_data->is(self::LM_HTML_EXPORT_RENDERING, true)) {
120 return $this->globalScreen()
121 ->layout()
122 ->factory()
123 ->breadcrumbs()
124 ->withModification(function (?Breadcrumbs $current = null): ?Breadcrumbs {
125 return null;
126 })->withHighPriority();
127 } else {
128 return null;
129 }
130 }

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  $screen_context_stack)

No main bar in HTML exports.

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

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

68 {
69 $additional_data = $screen_context_stack->current()->getAdditionalData();
70 if ($additional_data->is(self::LM_HTML_EXPORT_RENDERING, true)) {
71 return $this->globalScreen()
72 ->layout()
73 ->factory()
74 ->mainbar()
75 ->withModification(function (?MainBar $current = null): ?MainBar {
76 if ($current === null) {
77 return null;
78 }
79 global $DIC;
80
81 $lng = $DIC->language();
82 $f = $DIC->ui()->factory();
83
84 // create an offline main bar
85 $offline_main_bar = new \ILIAS\UI\Implementation\Component\MainControls\MainBar(
86 new \ILIAS\UI\Implementation\Component\SignalGenerator()
87 );
88 $grid_icon = $f->symbol()->icon()->custom(\ilUtil::getImagePath("standard/icon_tool.svg"), $lng->txt("more"));
89 $tools_button = $f->button()->bulky($grid_icon, $lng->txt("tools"), "#")->withEngagedState(true);
90 $offline_main_bar = $offline_main_bar->withToolsButton($tools_button);
91
92 // get tool ids for offline use from lm tools provider
93 $lm_tools = new ilLMGSToolProvider($DIC);
94 $ids = $lm_tools->getOfflineToolIds();
95
96 // copy all offline tools from original main bar to offline main bar
97 foreach ($current->getToolEntries() as $id => $te) {
98 if (in_array($id, $ids)) {
99 $offline_main_bar = $offline_main_bar->withAdditionalToolEntry(
100 $id,
101 $te
102 );
103 }
104 }
105
106 return $offline_main_bar;
107 })->withHighPriority();
108 } else {
109 return null;
110 }
111 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
factory()
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This describes the MainBar.
Definition: MainBar.php:34
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

◆ getMetaBarModification()

ilLMHtmlExportViewLayoutProvider::getMetaBarModification ( CalledContexts  $screen_context_stack)

No meta bar in HTML exports.

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

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

50 {
51 $additional_data = $screen_context_stack->current()->getAdditionalData();
52 if ($additional_data->is(self::LM_HTML_EXPORT_RENDERING, true)) {
53 return $this->globalScreen()
54 ->layout()
55 ->factory()
56 ->metabar()
57 ->withModification(function (?MetaBar $current = null): ?MetaBar {
58 return null;
59 })->withHighPriority();
60 }
61 return null;
62 }
This describes the MetaBar.
Definition: MetaBar.php:33

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: