ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
base.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
34 function base()
35 {
36  global $DIC;
37  $factory = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39 
40  $message = 'Here you see some key-value interruptive items:';
41  $modal = $factory->modal()->interruptive('My Title', $message, "#")
42  ->withAffectedItems(array(
43  $factory->modal()->interruptiveItem()->keyValue(
44  '10',
45  'First Key',
46  'first value'
47  ),
48  $factory->modal()->interruptiveItem()->keyValue(
49  '20',
50  'Second Key',
51  'second value'
52  ),
53  $factory->modal()->interruptiveItem()->keyValue(
54  '30',
55  'Third Key',
56  'really really long value, much much longer than any value needs to be, that should be cut off at some point'
57  )
58  ));
59  $button = $factory->button()->standard('Show some key-value interruptive Items', '')
60  ->withOnClick($modal->getShowSignal());
61 
62 
63  return $renderer->render([$button, $modal]);
64 }
$renderer
global $DIC
Definition: shib_login.php:22
$message
Definition: xapiexit.php:31
base()
description: > Example for rendering a key value interruptive item modal.
Definition: base.php:34