ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
base.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
17 function base()
18 {
19  global $DIC;
20  $factory = $DIC->ui()->factory();
21  $renderer = $DIC->ui()->renderer();
22 
23  $message = 'Here you see some standard interruptive items:';
24  $icon = $factory->image()->standard('./assets/images/standard/icon_crs.svg', '');
25  $modal = $factory->modal()->interruptive('My Title', $message, "#")
26  ->withAffectedItems(array(
27  $factory->modal()->interruptiveItem()->standard(
28  '10',
29  'Title of the Item',
30  $icon,
31  'Note, this item is currently only to be used in interruptive Modal.'
32  ),
33  $factory->modal()->interruptiveItem()->standard(
34  '20',
35  'Title of the other Item',
36  $icon,
37  'And another one.'
38  )
39  ));
40  $button = $factory->button()->standard('Show some standard interruptive items', '')
41  ->withOnClick($modal->getShowSignal());
42 
43 
44  return $renderer->render([$button, $modal]);
45 }
$renderer
base()
description: > Example for rendering a standard interruptive item modal.
Definition: base.php:17
global $DIC
Definition: shib_login.php:25