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 
32 function with_glyph()
33 {
34  global $DIC;
35  $f = $DIC->ui()->factory();
36  $renderer = $DIC->ui()->renderer();
37 
38  $glyph = $f->symbol()->glyph()->search();
39  $button = $f->button()->primary('search', '#')
40  ->withSymbol($glyph);
41  $button2 = $button->withLabel('');
42 
43  return $renderer->render([
44  $button,
45  $button->withEngagedState(true),
46  $button->withUnavailableAction(true),
47  $f->divider()->vertical(),
48  $button2,
49  $button2->withEngagedState(true),
50  $button2->withUnavailableAction(true),
51 
52  ]);
53 }
$renderer
global $DIC
Definition: shib_login.php:22
with_glyph()
description: > This example provides buttons with a Glyph in (and as) the label. ...
Definition: with_glyph.php:32