ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
with_custom_labels.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
35 {
36  global $DIC;
37  $factory = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39 
40  $modal = $factory->modal()->roundtrip(
41  'Showing something off',
42  [
43  $factory->messageBox()->info('I am something.'),
44  ]
45  )->withCancelButtonLabel(
46  'Thank you and goodbye'
47  )->withActionButtons([$factory->button()->standard('Nothing todo here', '#')]);
48 
49  $trigger = $factory->button()->standard('I will show you something', $modal->getShowSignal());
50 
51  return $renderer->render([$modal, $trigger]);
52 }
$renderer
with_custom_labels()
description: > An example showing how you can set a custom label for the modals cancel-button.
global $DIC
Definition: shib_login.php:22