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()->interruptive(
18  'Interrupting something',
19  'Am I interrupting you?',
20  '#'
21  )->withActionButtonLabel(
22  'Yeah you do!'
23  )->withCancelButtonLabel(
24  'Nah, not really'
25  );
26 
27  $trigger = $factory->button()->standard('I will interrupt you', $modal->getShowSignal());
28 
29  return $renderer->render([$modal, $trigger]);
30 }
with_custom_labels()
An example showing how you can set a custom label for the modals action- and cancel-button.
global $DIC
Definition: feed.php:28