Add start of IconExtension class

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

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']
])
];
}
}