ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
default_icon.php
Go to the documentation of this file.
1 <?php
2 function default_icon()
3 {
4  global $DIC;
5  $f = $DIC->ui()->factory();
6  $renderer = $DIC->ui()->renderer();
7 
8  $buffer = array();
9 
10  $ico = $f->icon()->standard('someExample', 'Example');
11  $ico = $ico->withAbbreviation('E');
12 
13  $buffer[] = $renderer->render($ico)
14  . ' Small Example with Short Abbreviation';
15 
16  $buffer[] = $renderer->render($ico->withSize('medium'))
17  . ' Medium Example with Short Abbreviation';
18 
19  $buffer[] = $renderer->render($ico->withSize('large'))
20  . ' Large Example with Short Abbreviation';
21 
22 
23  $ico = $f->icon()->standard('someOtherExample', 'Example');
24  $ico = $ico->withAbbreviation('LA');
25 
26  $buffer[] = $renderer->render($ico->withSize('small'))
27  . ' Small Example with Long Abbreviation';
28 
29  $buffer[] = $renderer->render($ico->withSize('medium'))
30  . ' Medium Example with Long Abbreviation';
31 
32  $buffer[] = $renderer->render($ico->withSize('large'))
33  . ' Large Example with Long Abbreviation';
34 
35 
36  return implode('<br><br>', $buffer);
37 }
global $DIC
Definition: saml.php:7
default_icon()
Definition: default_icon.php:2