ILIAS  release_8 Revision v8.23
with_signal_action.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
11 {
12  //Loading factories
13  global $DIC;
14  $f = $DIC->ui()->factory();
15  $renderer = $DIC->ui()->renderer();
16 
17  //Generating and rendering the image and modal
18  $image_in_modal = $f->image()->standard(
19  "src/UI/examples/Image/mountains.jpg",
20  ""
21  );
22  $page = $f->modal()->lightboxImagePage($image_in_modal, "Nice view");
23  $modal = $f->modal()->lightbox($page);
24 
25  $image = $f->image()->standard(
26  "src/UI/examples/Image/HeaderIconLarge.svg",
27  "Thumbnail Example"
28  )->withAction($modal->getShowSignal());
29 
30  $html = $renderer->render([$image, $modal]);
31 
32  return $html;
33 }
with_signal_action()
Example for rendering an Image with a signal as action.
global $DIC
Definition: feed.php:28