ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
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 
33 function base()
34 {
35  global $DIC;
36  $factory = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38 
39  $message = 'Here you see some standard interruptive items:';
40  $icon = $factory->image()->standard('./assets/images/standard/icon_crs.svg', '');
41  $modal = $factory->modal()->interruptive('My Title', $message, "#")
42  ->withAffectedItems(array(
43  $factory->modal()->interruptiveItem()->standard(
44  '10',
45  'Title of the Item',
46  $icon,
47  'Note, this item is currently only to be used in interruptive Modal.'
48  ),
49  $factory->modal()->interruptiveItem()->standard(
50  '20',
51  'Title of the other Item',
52  $icon,
53  'And another one.'
54  )
55  ));
56  $button = $factory->button()->standard('Show some standard interruptive items', '')
57  ->withOnClick($modal->getShowSignal());
58 
59 
60  return $renderer->render([$button, $modal]);
61 }
$renderer
base()
description: > Example for rendering a standard interruptive item modal.
Definition: base.php:33
global $DIC
Definition: shib_login.php:22
$message
Definition: xapiexit.php:31