ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_signal.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
17 function with_signal()
18 {
19  global $DIC;
20  $factory = $DIC->ui()->factory();
21  $renderer = $DIC->ui()->renderer();
22 
23  $image = $factory->image()->responsive("assets/ui-examples/images/Image/mountains.jpg", "Image source: https://stocksnap.io, Creative Commons CC0 license");
24  $page = $factory->modal()->lightboxImagePage($image, 'Mountains');
25  $modal = $factory->modal()->lightbox($page);
26 
27  $pagination = $factory->viewControl()->pagination()
28  ->withTotalEntries(98)
29  ->withPageSize(10)
30  ->withResetSignals()
31  ->withOnSelect($modal->getShowSignal());
32 
33  return $renderer->render([$pagination, $modal]);
34 }
$renderer
with_signal()
description: > Example for rendering a pagination view control with a signal
Definition: with_signal.php:17
global $DIC
Definition: shib_login.php:25