ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
with_signal_action.php File Reference

Go to the source code of this file.

Functions

 with_signal_action ()
 Example for rendering an Image with a signal as action. More...
 

Function Documentation

◆ with_signal_action()

with_signal_action ( )

Example for rendering an Image with a signal as action.

Definition at line 5 of file with_signal_action.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}
$html
Definition: example_001.php:87
global $DIC
Definition: saml.php:7

References $DIC, $f, and $html.