ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 19 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 102 of file class.ilLMHtmlExportViewLayoutProvider.php.

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

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  }
+ 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 53 of file class.ilLMHtmlExportViewLayoutProvider.php.

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

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 Factory.
This describes the MainBar.
Definition: MainBar.php:15
Class ChatMainBarProvider .
Class ilLMGSToolProvider.
$lng
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$DIC
Definition: xapitoken.php:46
+ 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 35 of file class.ilLMHtmlExportViewLayoutProvider.php.

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

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