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 
16 function with_glyph()
17 {
18  global $DIC;
19  $f = $DIC->ui()->factory();
20  $renderer = $DIC->ui()->renderer();
21 
22  $glyph = $f->symbol()->glyph()->search();
23  $button = $f->button()->primary('search', '#')
24  ->withSymbol($glyph);
25  $button2 = $button->withLabel('');
26 
27  return $renderer->render([
28  $button,
29  $button->withEngagedState(true),
30  $button->withUnavailableAction(true),
31  $f->divider()->vertical(),
32  $button2,
33  $button2->withEngagedState(true),
34  $button2->withUnavailableAction(true),
35 
36  ]);
37 }
$renderer
global $DIC
Definition: shib_login.php:25
with_glyph()
description: > This example provides buttons with a Glyph in (and as) the label. ...
Definition: with_glyph.php:16