Go to the source code of this file.
◆ custom_icon()
Definition at line 2 of file custom_icon.php.
References $DIC, and Vendor\Package\$f.
5 $f = $DIC->ui()->factory();
6 $renderer = $DIC->ui()->renderer();
10 $path =
'./src/UI/examples/Symbol/Icon/Custom/my_custom_icon.svg';
11 $ico =
$f->symbol()->icon()->custom($path,
'Example');
13 $buffer[] = $renderer->render($ico)
14 .
' Small Custom Icon';
16 $buffer[] = $renderer->render($ico->withSize(
'medium'))
17 .
' Medium Custom Icon';
19 $buffer[] = $renderer->render($ico->withSize(
'large'))
20 .
' Large Custom Icon';
25 $path =
'./templates/default/images/outlined/icon_fold.svg';
26 $ico =
$f->symbol()->icon()->custom($path,
'Example')
27 ->withAbbreviation(
'FD');
29 $buffer[] = $renderer->render($ico)
30 .
' Small Custom Icon with Abbreviation';
32 $buffer[] = $renderer->render($ico->withSize(
'medium'))
33 .
' Medium Custom Icon with Abbreviation';
35 $buffer[] = $renderer->render($ico->withSize(
'large'))
36 .
' Large Custom Icon with Abbreviation';
39 return implode(
'<br><br>', $buffer);