3 declare(strict_types=1);
10 $f = $DIC->ui()->factory();
11 $renderer = $DIC->ui()->renderer();
15 $path =
'./src/UI/examples/Symbol/Icon/Custom/my_custom_icon.svg';
16 $ico =
$f->symbol()->icon()->custom(
$path,
'Example');
18 $buffer[] = $renderer->render($ico)
19 .
' Small Custom Icon';
21 $buffer[] = $renderer->render($ico->withSize(
'medium'))
22 .
' Medium Custom Icon';
24 $buffer[] = $renderer->render($ico->withSize(
'large'))
25 .
' Large Custom Icon';
30 $path =
'./templates/default/images/icon_fold.svg';
31 $ico =
$f->symbol()->icon()->custom(
$path,
'Example')
32 ->withAbbreviation(
'FD');
34 $buffer[] = $renderer->render($ico)
35 .
' Small Custom Icon with Abbreviation';
37 $buffer[] = $renderer->render($ico->withSize(
'medium'))
38 .
' Medium Custom Icon with Abbreviation';
40 $buffer[] = $renderer->render($ico->withSize(
'large'))
41 .
' Large Custom Icon with Abbreviation';
44 return implode(
'<br><br>', $buffer);