ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
base.php
Go to the documentation of this file.
1<?php
2function base()
3{
4 global $DIC;
5 $factory = $DIC->ui()->factory();
6 $renderer = $DIC->ui()->renderer();
7
8 $message1 = 'Toggle Button has been turned on';
9 $message2 = 'Toggle Button has been turned off';
10 $form_action = $DIC->ctrl()->getFormActionByClass('ilsystemstyledocumentationgui');
11
12 $modal = $factory->modal()->interruptive('ON', $message1, $form_action);
13 $modal2 = $factory->modal()->interruptive('OFF', $message2, $form_action);
14
15 $button = $factory->button()->toggle("", $modal->getShowSignal(), $modal2->getShowSignal());
16
17 return $renderer->render([$button, $modal, $modal2]);
18}
base()
Definition: base.php:2
$factory
Definition: metadata.php:43
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: saml.php:7