19 declare(strict_types=1);
36 $f = $DIC->ui()->factory();
41 $path =
'./assets/ui-examples/images/Icon/my_custom_icon.svg';
42 $ico =
$f->symbol()->icon()->custom(
$path,
'Example');
45 .
' Small Custom Icon';
47 $buffer[] =
$renderer->render($ico->withSize(
'medium'))
48 .
' Medium Custom Icon';
50 $buffer[] =
$renderer->render($ico->withSize(
'large'))
51 .
' Large Custom Icon';
56 $path =
'./assets/images/standard/icon_fold.svg';
57 $ico =
$f->symbol()->icon()->custom(
$path,
'Example')
58 ->withAbbreviation(
'FD');
61 .
' Small Custom Icon with Abbreviation';
63 $buffer[] =
$renderer->render($ico->withSize(
'medium'))
64 .
' Medium Custom Icon with Abbreviation';
66 $buffer[] =
$renderer->render($ico->withSize(
'large'))
67 .
' Large Custom Icon with Abbreviation';
70 return implode(
'<br><br>', $buffer);
custom_icon()
description: > Example for rendering custom icons.