ILIAS  release_7 Revision v7.30-3-g800a261c036
with_signal_action.php
Go to the documentation of this file.
1<?php
6{
7 //Loading factories
8 global $DIC;
9 $f = $DIC->ui()->factory();
10 $renderer = $DIC->ui()->renderer();
11
12 //Genarating and rendering the image and modal
13 $image_in_modal = $f->image()->standard(
14 "src/UI/examples/Image/mountains.jpg",
15 ""
16 );
17 $page = $f->modal()->lightboxImagePage($image_in_modal, "Nice view");
18 $modal = $f->modal()->lightbox($page);
19
20 $image = $f->image()->standard(
21 "src/UI/examples/Image/HeaderIconLarge.svg",
22 "Thumbnail Example"
23 )->withAction($modal->getShowSignal());
24
25 $html = $renderer->render([$image, $modal]);
26
27 return $html;
28}
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: goto.php:24
with_signal_action()
Example for rendering an Image with a signal as action.