Go to the source code of this file.
◆ custom_icon()
Definition at line 2 of file custom_icon.php.
References $DIC, $path, and array.
5 $f = $DIC->ui()->factory();
6 $renderer = $DIC->ui()->renderer();
10 $path =
'./templates/default/images/icon_reps.svg';
11 $ico = $f->icon()->custom(
$path,
'Example');
13 $buffer[] = $renderer->render($ico)
16 $buffer[] = $renderer->render($ico->withSize(
'medium'))
19 $buffer[] = $renderer->render($ico->withSize(
'large'))
23 $path =
'./templates/default/images/icon_fold.svg';
24 $ico = $f->icon()->custom(
$path,
'Example')
25 ->withAbbreviation(
'FD');
27 $buffer[] = $renderer->render($ico)
28 .
' Custom Icon with Abbreviation';
30 $buffer[] = $renderer->render($ico->withSize(
'medium'))
31 .
' Custom Icon with Abbreviation';
33 $buffer[] = $renderer->render($ico->withSize(
'large'))
34 .
' Custom Icon with Abbreviation';
37 return implode(
'<br><br>', $buffer);
Create styles array
The data for the language used.