10 $f = $DIC->ui()->factory();
11 $renderer = $DIC->ui()->renderer();
13 $button =
$f->button()->toggle(
'',
'#',
'#')
14 ->withAriaLabel(
"Switch the State of XY")
15 ->withUnavailableAction();
17 return $renderer->render([$button]);
unavailable_action()
This example provides the given button with an unavailable action.