Elgg
Version 6.1
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Javascript
SetLightboxConfigHandler.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Javascript
;
4
10
class
SetLightboxConfigHandler
{
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
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition:
languages.php:17
Elgg
Definition:
ActionsService.php:3
elgg_view_icon
elgg_view_icon(string $name, array $vars=[])
View an icon glyph.
Definition:
views.php:1261
Elgg\Javascript
Definition:
ESMService.php:3
Elgg\Javascript\SetLightboxConfigHandler
Adds lightbox config to js elgg.data object.
Definition:
SetLightboxConfigHandler.php:10
Elgg\Javascript\SetLightboxConfigHandler\__invoke
__invoke(\Elgg\Event $event)
Set lightbox config.
Definition:
SetLightboxConfigHandler.php:19
Elgg\Event
Models an event passed to event handlers.
Definition:
Event.php:11
Generated on Wed Dec 4 2024 00:00:21 for Elgg by
1.8.11