ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
with_glyph.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
33 function with_glyph()
34 {
35  global $DIC;
36  $f = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38 
39  $glyph = $f->symbol()->glyph()->search();
40  $button = $f->button()->standard('search', '#')
41  ->withSymbol($glyph);
42  $button2 = $button->withLabel('')
43  ->withAriaLabel('search');
44 
45  return $renderer->render([
46  $button,
47  $button->withEngagedState(true),
48  $button->withUnavailableAction(true),
49  $f->divider()->vertical(),
50  $button2,
51  $button2->withEngagedState(true),
52  $button2->withUnavailableAction(true),
53 
54  ]);
55 }
$renderer
with_glyph()
description: > This example provides buttons with a Glyph in (and as) the label. ...
Definition: with_glyph.php:33
global $DIC
Definition: shib_login.php:22