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

Public Member Functions

 __construct (Container $dic)
 
 isInterestedInContexts ()
 
 getMetaBarModification (CalledContexts $screen_context_stack)
 
- 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 (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 

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\components\WOPI\Embed\EmbeddedApplicationGSProvider::__construct ( Container  $dic)

Definition at line 55 of file EmbeddedApplicationGSProvider.php.

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

56  {
58  global $DIC;
59  $this->signal_generator = $DIC["ui.signal_generator"];
60  }
global $DIC
Definition: shib_login.php:26
__construct(Container $dic, ilPlugin $plugin)
$dic
Definition: result.php:31
+ Here is the call graph for this function:

Member Function Documentation

◆ buildCloseButton()

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

Definition at line 147 of file EmbeddedApplicationGSProvider.php.

References $id, and ILIAS\components\WOPI\Embed\EmbeddedApplication\getBackTarget().

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

149  : Bulky {
150  $uif = $this->dic->ui()->factory();
151  $back_target = $embedded_application->getBackTarget();
152  $signal = $this->signal_generator->create();
153  $signal->addOption('target_url', (string) $back_target);
154  return $uif->button()->bulky(
155  $uif->symbol()->glyph()->close(),
156  $this->dic->language()->txt('close'),
157  (string) $back_target
158  )->withOnClick(
159  $signal
160  )->withOnLoadCode(fn($id): string => "il.WOPI.bindCloseSignal('$id', '{$signal->getId()}');");
161  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMetaBarModification()

ILIAS\components\WOPI\Embed\EmbeddedApplicationGSProvider::getMetaBarModification ( CalledContexts  $screen_context_stack)
Parameters
CalledContexts$screen_context_stack
Returns
MetaBarModification|null

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

Definition at line 114 of file EmbeddedApplicationGSProvider.php.

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

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

◆ isInterestedInContexts()

ILIAS\components\WOPI\Embed\EmbeddedApplicationGSProvider::isInterestedInContexts ( )

Field Documentation

◆ $display_mode

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

Definition at line 51 of file EmbeddedApplicationGSProvider.php.

◆ $signal_generator

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

Definition at line 53 of file EmbeddedApplicationGSProvider.php.

◆ EMBEDDED_APPLICATION

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

Definition at line 52 of file EmbeddedApplicationGSProvider.php.

◆ USE_METABAR

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

Definition at line 46 of file EmbeddedApplicationGSProvider.php.

◆ USE_MODE_INFO

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

Definition at line 50 of file EmbeddedApplicationGSProvider.php.


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