19 declare(strict_types=1);
53 $this->signal_generator = $DIC[
"ui.signal_generator"];
58 return $this->context_collection->
repository();
64 if ($this->display_mode !== self::USE_MODE_INFO) {
67 if (!$screen_context_stack->
current()->getAdditionalData()->exists(self::EMBEDDED_APPLICATION)) {
70 $embedded_application = $screen_context_stack->
current()->getAdditionalData()->get(
71 self::EMBEDDED_APPLICATION
77 return $this->factory->page()->withHighPriority()->withModification(
79 $uif = $this->dic->ui()->factory();
86 $back_to = $this->dic->ctrl()->getLinkTargetByClass(
87 \ilWOPIEmbeddedApplicationGUI::class,
90 $back_to =
new URI(rtrim(ILIAS_HTTP_PATH,
'/') .
'/' . ltrim($back_to,
'./'));
92 $page = $builder->build($page_part_provider);
93 if (!$embedded_application->isInline()) {
94 $page = $page->withModeInfo(
95 $uif->mainControls()->modeInfo(
96 $this->dic->language()->txt(
'close_wopi_editor'),
100 $page = $page->withSystemInfos([]);
110 if ($this->display_mode !== self::USE_METABAR) {
113 if (!$screen_context_stack->
current()->getAdditionalData()->exists(self::EMBEDDED_APPLICATION)) {
117 $embedded_application = $screen_context_stack->
current()->getAdditionalData()->get(
118 self::EMBEDDED_APPLICATION
124 if ($embedded_application->isInline()) {
130 return $this->factory->metabar()->withHighPriority()->withModification(
131 fn(?
MetaBar $metabar): ?Metabar => $metabar !== null
133 ->withAdditionalEntry(
144 $uif = $this->dic->ui()->factory();
146 $signal = $this->signal_generator->create();
147 $signal->addOption(
'target_url', (
string) $back_target);
148 return $uif->button()->bulky(
149 $uif->symbol()->glyph()->close(),
150 $this->dic->language()->txt(
'close'),
151 (string) $back_target
154 )->withOnLoadCode(fn(
$id):
string =>
"il.WOPI.bindCloseSignal('$id', '{$signal->getId()}');");
__construct(Container $dic)
buildCloseButton(EmbeddedApplication $embedded_application,)
withClearedEntries()
Get a copy of this MetaBar without any entries.
readonly SignalGeneratorInterface $signal_generator
Class PageBuilderModification.
Interface PagePartProvider.
Customizing of pimple-DIC for ILIAS.
getPageBuilderDecorator(CalledContexts $screen_context_stack)
Class AbstractModificationProvider.
The scope of this class is split ilias-conform URI's into components.
const EMBEDDED_APPLICATION
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes the MetaBar.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getMetaBarModification(CalledContexts $screen_context_stack)