ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider Class Reference
+ Inheritance diagram for ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider:
+ Collaboration diagram for ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider:

Public Member Functions

 __construct (Container $dic)
 @inheritDoc More...
 
 isInterestedInContexts ()
 
 getMetaBarModification (CalledContexts $screen_context_stack)
 @inheritDoc 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 EMBEDDED_APPLICATION = 'embedded_application'
 

Protected Member Functions

 buildCloseButton (EmbeddedApplication $embedded_application,)
 
- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 

Private Attributes

const USE_METABAR = 1
 
const USE_MODE_INFO = 2
 
int $display_mode = self::USE_MODE_INFO
 
readonly SignalGeneratorInterface $signal_generator
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider
ContextCollection $context_collection
 
DataFactory $data
 
ModificationFactory $factory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider::__construct ( Container  $dic)

@inheritDoc

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

Definition at line 57 of file EmbeddedApplicationGSProvider.php.

58 {
60 global $DIC;
61 $this->signal_generator = new SignalGenerator();
62 }
$dic
Definition: ltiresult.php:33
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, $dic, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ buildCloseButton()

ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider::buildCloseButton ( EmbeddedApplication  $embedded_application)
protected

Definition at line 149 of file EmbeddedApplicationGSProvider.php.

151 : Bulky {
152 $uif = $this->dic->ui()->factory();
153 $back_target = $embedded_application->getBackTarget();
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
160 )->withOnClick(
161 $signal
162 )->withOnLoadCode(fn($id): string => "il.WOPI.bindCloseSignal('$id', '{$signal->getId()}');");
163 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

Referenced by ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider\getMetaBarModification().

+ Here is the caller graph for this function:

◆ getMetaBarModification()

ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider::getMetaBarModification ( CalledContexts  $screen_context_stack)

@inheritDoc

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

Definition at line 116 of file EmbeddedApplicationGSProvider.php.

116 : ?MetaBarModification
117 {
118 if ($this->display_mode !== self::USE_METABAR) {
119 return null;
120 }
121 if (!$screen_context_stack->current()->getAdditionalData()->exists(self::EMBEDDED_APPLICATION)) {
122 return null;
123 }
124
125 $embedded_application = $screen_context_stack->current()->getAdditionalData()->get(
126 self::EMBEDDED_APPLICATION
127 );
128 if (!$embedded_application instanceof EmbeddedApplication) {
129 return null;
130 }
131
132 if ($embedded_application->isInline()) {
133 return null;
134 }
135
136 $button = $this->buildCloseButton($embedded_application);
137
138 return $this->factory->metabar()->withHighPriority()->withModification(
139 fn(?MetaBar $metabar): ?Metabar => $metabar !== null
140 ? $metabar->withClearedEntries()
141 ->withAdditionalEntry(
142 'close_editor',
143 $button
144 )
145 : null
146 );
147 }
factory()
buildCloseButton(EmbeddedApplication $embedded_application,)

References ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider\buildCloseButton(), ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), factory(), and ILIAS\UI\Component\MainControls\MetaBar\withClearedEntries().

+ Here is the call graph for this function:

◆ isInterestedInContexts()

ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider::isInterestedInContexts ( )
Returns
ContextCollection

Implements ILIAS\GlobalScreen\ScreenContext\ScreenContextAwareProvider.

Definition at line 64 of file EmbeddedApplicationGSProvider.php.

64 : ContextCollection
65 {
66 return $this->context_collection->repository();
67 }

References ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\repository().

+ Here is the call graph for this function:

Field Documentation

◆ $display_mode

int ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider::$display_mode = self::USE_MODE_INFO
private

Definition at line 53 of file EmbeddedApplicationGSProvider.php.

◆ $signal_generator

readonly SignalGeneratorInterface ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider::$signal_generator
private

Definition at line 55 of file EmbeddedApplicationGSProvider.php.

◆ EMBEDDED_APPLICATION

const ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider::EMBEDDED_APPLICATION = 'embedded_application'

Definition at line 54 of file EmbeddedApplicationGSProvider.php.

◆ USE_METABAR

const ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider::USE_METABAR = 1
private

Definition at line 48 of file EmbeddedApplicationGSProvider.php.

◆ USE_MODE_INFO

const ILIAS\WOPI\Embed\EmbeddedApplicationGSProvider::USE_MODE_INFO = 2
private

Definition at line 52 of file EmbeddedApplicationGSProvider.php.


The documentation for this class was generated from the following file: