Elgg  Version master
SetLightboxConfigHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Javascript;
4 
11 
19  public function __invoke(\Elgg\Event $event) {
20  $return = $event->getValue();
21 
22  $return['lightbox'] = [
23  'current' => elgg_echo('js:lightbox:current', ['{current}', '{total}']),
24  'previous' => elgg_view_icon('caret-left'),
25  'next' => elgg_view_icon('caret-right'),
26  'close' => elgg_view_icon('times'),
27  'opacity' => 0.5,
28  'maxWidth' => '990px',
29  'maxHeight' => '990px',
30  'initialWidth' => '300px',
31  'initialHeight' => '300px',
32  ];
33 
34  return $return;
35  }
36 }
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_view_icon(string $name, array $vars=[])
View an icon glyph.
Definition: views.php:1261
Adds lightbox config to js elgg.data object.
__invoke(\Elgg\Event $event)
Set lightbox config.
Models an event passed to event handlers.
Definition: Event.php:11