ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
default_icon.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
16 function default_icon()
17 {
18  global $DIC;
19  $f = $DIC->ui()->factory();
20  $renderer = $DIC->ui()->renderer();
21 
22  $buffer = array();
23 
24  $ico = $f->symbol()->icon()->standard('someExample', 'Example');
25  $ico = $ico->withAbbreviation('E');
26 
27  $buffer[] = $renderer->render($ico)
28  . ' Small Example with Short Abbreviation';
29 
30  $buffer[] = $renderer->render($ico->withSize('medium'))
31  . ' Medium Example with Short Abbreviation';
32 
33  $buffer[] = $renderer->render($ico->withSize('large'))
34  . ' Large Example with Short Abbreviation';
35 
36 
37  $ico = $f->symbol()->icon()->standard('someOtherExample', 'Example');
38  $ico = $ico->withAbbreviation('LA');
39 
40  $buffer[] = $renderer->render($ico->withSize('small'))
41  . ' Small Example with Long Abbreviation';
42 
43  $buffer[] = $renderer->render($ico->withSize('medium'))
44  . ' Medium Example with Long Abbreviation';
45 
46  $buffer[] = $renderer->render($ico->withSize('large'))
47  . ' Large Example with Long Abbreviation';
48 
49 
50  return implode('<br><br>', $buffer);
51 }
$renderer
default_icon()
description: > Example for rendering a standard icon.
global $DIC
Definition: shib_login.php:25