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 
18 function base()
19 {
20  global $DIC;
21  $factory = $DIC->ui()->factory();
22  $renderer = $DIC->ui()->renderer();
23 
24  $message = 'Here you see some key-value interruptive items:';
25  $modal = $factory->modal()->interruptive('My Title', $message, "#")
26  ->withAffectedItems(array(
27  $factory->modal()->interruptiveItem()->keyValue(
28  '10',
29  'First Key',
30  'first value'
31  ),
32  $factory->modal()->interruptiveItem()->keyValue(
33  '20',
34  'Second Key',
35  'second value'
36  ),
37  $factory->modal()->interruptiveItem()->keyValue(
38  '30',
39  'Third Key',
40  'really really long value, much much longer than any value needs to be, that should be cut off at some point'
41  )
42  ));
43  $button = $factory->button()->standard('Show some key-value interruptive Items', '')
44  ->withOnClick($modal->getShowSignal());
45 
46 
47  return $renderer->render([$button, $modal]);
48 }
$renderer
global $DIC
Definition: shib_login.php:25
base()
description: > Example for rendering a key value interruptive item modal.
Definition: base.php:18