ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 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)
 
 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 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 35 of file class.ilLMHtmlExportViewLayoutProvider.php.

Member Function Documentation

◆ getBreadCrumbsModification()

ilLMHtmlExportViewLayoutProvider::getBreadCrumbsModification ( CalledContexts  $called_contexts)

No breadcrumbs in HTML exports.

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

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

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

119  {
120  $additional_data = $called_contexts->current()->getAdditionalData();
121  if ($additional_data->is(self::LM_HTML_EXPORT_RENDERING, true)) {
122  return $this->globalScreen()
123  ->layout()
124  ->factory()
125  ->breadcrumbs()
126  ->withModification(function (?Breadcrumbs $current = null) : ?Breadcrumbs {
127  return null;
128  })->withHighPriority();
129  } else {
130  return null;
131  }
132  }
+ Here is the call graph for this function:

◆ getMainBarModification()

ilLMHtmlExportViewLayoutProvider::getMainBarModification ( CalledContexts  $called_contexts)

No main bar in HTML exports.

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

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

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

70  {
71  $additional_data = $called_contexts->current()->getAdditionalData();
72  if ($additional_data->is(self::LM_HTML_EXPORT_RENDERING, true)) {
73  return $this->globalScreen()
74  ->layout()
75  ->factory()
76  ->mainbar()
77  ->withModification(function (?MainBar $current = null) : ?MainBar {
78  if ($current === null) {
79  return null;
80  }
81  global $DIC;
82 
83  $lng = $DIC->language();
84  $f = $DIC->ui()->factory();
85 
86  // create an offline main bar
87  $offline_main_bar = new \ILIAS\UI\Implementation\Component\MainControls\MainBar(
88  new \ILIAS\UI\Implementation\Component\SignalGenerator()
89  );
90  $grid_icon = $f->symbol()->icon()->custom(\ilUtil::getImagePath("outlined/icon_tool.svg"), $lng->txt("more"));
91  $tools_button = $f->button()->bulky($grid_icon, $lng->txt("tools"), "#")->withEngagedState(true);
92  $offline_main_bar = $offline_main_bar->withToolsButton($tools_button);
93 
94  // get tool ids for offline use from lm tools provider
95  $lm_tools = new ilLMGSToolProvider($DIC);
96  $ids = $lm_tools->getOfflineToolIds();
97 
98  // copy all offline tools from original main bar to offline main bar
99  foreach ($current->getToolEntries() as $id => $te) {
100  if (in_array($id, $ids)) {
101  $offline_main_bar = $offline_main_bar->withAdditionalToolEntry(
102  $id,
103  $te
104  );
105  }
106  }
107 
108  return $offline_main_bar;
109  })->withHighPriority();
110  } else {
111  return null;
112  }
113  }
Class Factory.
This describes the MainBar.
Definition: MainBar.php:16
Class ChatMainBarProvider .
Class ilLMGSToolProvider.
$lng
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ getMetaBarModification()

ilLMHtmlExportViewLayoutProvider::getMetaBarModification ( CalledContexts  $called_contexts)

No meta bar in HTML exports.

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

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

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

52  {
53  $additional_data = $called_contexts->current()->getAdditionalData();
54  if ($additional_data->is(self::LM_HTML_EXPORT_RENDERING, true)) {
55  return $this->globalScreen()
56  ->layout()
57  ->factory()
58  ->metabar()
59  ->withModification(function (MetaBar $current = null) : ?MetaBar {
60  return null;
61  })->withHighPriority();
62  }
63  return null;
64  }
This describes the MetaBar.
Definition: MetaBar.php:14
+ 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: