23 lines
457 B
PHP
23 lines
457 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pcm\IconBundle\Twig\Extension;
|
|
|
|
use Pcm\IconBundle\Twig\Runtime\IconRuntime;
|
|
use Twig\Extension\AbstractExtension;
|
|
use Twig\TwigFunction;
|
|
|
|
final class IconExtension extends AbstractExtension
|
|
{
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function getFunctions(): array
|
|
{
|
|
return [
|
|
new TwigFunction('pcm_icon', [IconRuntime::class, 'renderIcon'], ['is_safe' => ['html']])
|
|
];
|
|
}
|
|
}
|