ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
show_a_single_image.php File Reference

Go to the source code of this file.

Functions

 show_a_single_image ()
 

Function Documentation

◆ show_a_single_image()

show_a_single_image ( )

Definition at line 2 of file show_a_single_image.php.

3{
4 global $DIC;
5 $factory = $DIC->ui()->factory();
6 $renderer = $DIC->ui()->renderer();
7 $image = $factory->image()->responsive("src/UI/examples/Image/mountains.jpg", "Image source: https://stocksnap.io, Creative Commons CC0 license");
8 $page = $factory->modal()->lightboxImagePage($image, 'Mountains');
9 $modal = $factory->modal()->lightbox($page);
10 $button = $factory->button()->standard('Show Image', '')
11 ->withOnClick($modal->getShowSignal());
12
13 return $renderer->render([$button, $modal]);
14}
$factory
Definition: metadata.php:58
$DIC
Definition: xapitoken.php:46

References $DIC, and $factory.