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