ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
with_custom_labels.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
12 {
13  global $DIC;
14  $factory = $DIC->ui()->factory();
15  $renderer = $DIC->ui()->renderer();
16 
17  $modal = $factory->modal()->roundtrip(
18  'Showing something off',
19  [
20  $factory->messageBox()->info('I am something.'),
21  ]
22  )->withCancelButtonLabel(
23  'Thank you and goodbye'
24  )->withActionButtons([$factory->button()->standard('Nothing todo here', '#')]);
25 
26  $trigger = $factory->button()->standard('I will show you something', $modal->getShowSignal());
27 
28  return $renderer->render([$modal, $trigger]);
29 }
with_custom_labels()
An example showing how you can set a custom label for the modals cancel-button.
global $DIC
Definition: feed.php:28