ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
unavailable_action.php File Reference

Go to the source code of this file.

Functions

 unavailable_action ()
 This example provides the given button with an unavailable action. More...
 

Function Documentation

◆ unavailable_action()

unavailable_action ( )

This example provides the given button with an unavailable action.

Note that the disabled attribute is set in the DOM. No action must be fired, even if done by keyboard

Definition at line 7 of file unavailable_action.php.

References $DIC, and Vendor\Package\$f.

8 {
9  global $DIC;
10  $f = $DIC->ui()->factory();
11  $renderer = $DIC->ui()->renderer();
12 
13  $button = $f->button()->toggle('', '#', '#')
14  ->withAriaLabel("Switch the State of XY")
15  ->withUnavailableAction();
16 
17  return $renderer->render([$button]);
18 }
$DIC
Definition: xapitoken.php:46