3 declare(strict_types=1);
20 $f = $DIC->ui()->factory();
25 $path =
'./assets/ui-examples/images/Icon/my_custom_icon.svg';
26 $ico =
$f->symbol()->icon()->custom(
$path,
'Example');
29 .
' Small Custom Icon';
31 $buffer[] =
$renderer->render($ico->withSize(
'medium'))
32 .
' Medium Custom Icon';
34 $buffer[] =
$renderer->render($ico->withSize(
'large'))
35 .
' Large Custom Icon';
40 $path =
'./assets/images/standard/icon_fold.svg';
41 $ico =
$f->symbol()->icon()->custom(
$path,
'Example')
42 ->withAbbreviation(
'FD');
45 .
' Small Custom Icon with Abbreviation';
47 $buffer[] =
$renderer->render($ico->withSize(
'medium'))
48 .
' Medium Custom Icon with Abbreviation';
50 $buffer[] =
$renderer->render($ico->withSize(
'large'))
51 .
' Large Custom Icon with Abbreviation';
54 return implode(
'<br><br>', $buffer);
custom_icon()
description: > Example for rendering custom icons.