19declare(strict_types=1);
66 return $this->context_collection->
repository();
72 if ($this->display_mode !== self::USE_MODE_INFO) {
75 if (!$screen_context_stack->
current()->getAdditionalData()->exists(self::EMBEDDED_APPLICATION)) {
78 $embedded_application = $screen_context_stack->
current()->getAdditionalData()->get(
79 self::EMBEDDED_APPLICATION
81 if (!$embedded_application instanceof EmbeddedApplication) {
85 return $this->
factory->page()->withHighPriority()->withModification(
86 function (PagePartProvider $p) use ($embedded_application): Page {
87 $uif = $this->dic->ui()->
factory();
88 $builder =
new StandardPageBuilder();
89 $page_part_provider =
new EmbeddedApplicationPagePartProvider(
94 $back_to = $this->dic->ctrl()->getLinkTargetByClass(
95 \ilWOPIEmbeddedApplicationGUI::class,
98 $back_to =
new URI(rtrim(ILIAS_HTTP_PATH,
'/') .
'/' . ltrim($back_to,
'./'));
100 $page = $builder->build($page_part_provider);
101 if (!$embedded_application->isInline()) {
102 $page = $page->withModeInfo(
103 $uif->mainControls()->modeInfo(
104 $this->dic->language()->txt(
'close_wopi_editor'),
108 $page = $page->withSystemInfos([]);
118 if ($this->display_mode !== self::USE_METABAR) {
121 if (!$screen_context_stack->
current()->getAdditionalData()->exists(self::EMBEDDED_APPLICATION)) {
125 $embedded_application = $screen_context_stack->
current()->getAdditionalData()->get(
126 self::EMBEDDED_APPLICATION
132 if ($embedded_application->isInline()) {
138 return $this->
factory->metabar()->withHighPriority()->withModification(
139 fn(?
MetaBar $metabar): ?Metabar => $metabar !==
null
141 ->withAdditionalEntry(
154 $signal = $this->signal_generator->create();
155 $signal->addOption(
'target_url', (
string) $back_target);
156 return $uif->button()->bulky(
157 $uif->symbol()->glyph()->close(),
158 $this->dic->language()->txt(
'close'),
159 (
string) $back_target
162 )->withOnLoadCode(fn(
$id):
string =>
"il.WOPI.bindCloseSignal('$id', '{$signal->getId()}');");
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Customizing of pimple-DIC for ILIAS.
The scope of this class is split ilias-conform URI's into components.
Class PageBuilderModification.
Class AbstractModificationProvider.
getPageBuilderDecorator(CalledContexts $screen_context_stack)
@inheritDoc
buildCloseButton(EmbeddedApplication $embedded_application,)
getMetaBarModification(CalledContexts $screen_context_stack)
@inheritDoc
__construct(Container $dic)
@inheritDoc
readonly SignalGeneratorInterface $signal_generator
const EMBEDDED_APPLICATION
Interface ModificationProvider.
Interface PagePartProvider.
This describes the MetaBar.
withClearedEntries()
Get a copy of this MetaBar without any entries.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc