ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_glyph.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
17 function with_glyph()
18 {
19  global $DIC;
20  $f = $DIC->ui()->factory();
21  $renderer = $DIC->ui()->renderer();
22 
23  $glyph = $f->symbol()->glyph()->search();
24  $button = $f->button()->standard('search', '#')
25  ->withSymbol($glyph);
26  $button2 = $button->withLabel('')
27  ->withAriaLabel('search');
28 
29  return $renderer->render([
30  $button,
31  $button->withEngagedState(true),
32  $button->withUnavailableAction(true),
33  $f->divider()->vertical(),
34  $button2,
35  $button2->withEngagedState(true),
36  $button2->withUnavailableAction(true),
37 
38  ]);
39 }
$renderer
with_glyph()
description: > This example provides buttons with a Glyph in (and as) the label. ...
Definition: with_glyph.php:17
global $DIC
Definition: shib_login.php:25