ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_custom_labels.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
19 {
20  global $DIC;
21  $factory = $DIC->ui()->factory();
22  $renderer = $DIC->ui()->renderer();
23 
24  $modal = $factory->modal()->roundtrip(
25  'Showing something off',
26  [
27  $factory->messageBox()->info('I am something.'),
28  ]
29  )->withCancelButtonLabel(
30  'Thank you and goodbye'
31  )->withActionButtons([$factory->button()->standard('Nothing todo here', '#')]);
32 
33  $trigger = $factory->button()->standard('I will show you something', $modal->getShowSignal());
34 
35  return $renderer->render([$modal, $trigger]);
36 }
$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:25