ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
default_icon.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
32function default_icon()
33{
34 global $DIC;
35 $f = $DIC->ui()->factory();
36 $renderer = $DIC->ui()->renderer();
37
38 $buffer = array();
39
40 $ico = $f->symbol()->icon()->standard('someExample', 'Example');
41 $ico = $ico->withAbbreviation('E');
42
43 $buffer[] = $renderer->render($ico)
44 . ' Small Example with Short Abbreviation';
45
46 $buffer[] = $renderer->render($ico->withSize('medium'))
47 . ' Medium Example with Short Abbreviation';
48
49 $buffer[] = $renderer->render($ico->withSize('large'))
50 . ' Large Example with Short Abbreviation';
51
52
53 $ico = $f->symbol()->icon()->standard('someOtherExample', 'Example');
54 $ico = $ico->withAbbreviation('LA');
55
56 $buffer[] = $renderer->render($ico->withSize('small'))
57 . ' Small Example with Long Abbreviation';
58
59 $buffer[] = $renderer->render($ico->withSize('medium'))
60 . ' Medium Example with Long Abbreviation';
61
62 $buffer[] = $renderer->render($ico->withSize('large'))
63 . ' Large Example with Long Abbreviation';
64
65
66 return implode('<br><br>', $buffer);
67}
$renderer
global $DIC
Definition: shib_login.php:26