Add start of IconExtension class

This commit is contained in:
Brabli committed 2022-07-23 19:53:26 +01:00
1 parent ae5c5fbf71
commit b5b51132f3
5 files changed
+67 -10

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace Pcm\IconBundle\Twig\Functions;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
final class IconExtension extends AbstractExtension
{
/**
* @inheritDoc
*/
public function getFunctions(): array
{
return [
new TwigFunction('icon', [$this, 'render'], [
'is_safe' => ['html']
])
];
}
}