[TWIG] Add SVG icon embed function
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
namespace App\Twig;
|
||||
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFilter;
|
||||
use Twig\TwigFunction;
|
||||
|
||||
class Extension extends AbstractExtension
|
||||
@@ -51,6 +50,7 @@ class Extension extends AbstractExtension
|
||||
new TwigFunction('is_route', [Runtime::class, 'isCurrentRoute']),
|
||||
new TwigFunction('get_note_actions', [Runtime::class, 'getNoteActions']),
|
||||
new TwigFunction('config', [Runtime::class, 'getConfig']),
|
||||
new TwigFunction('icon', [Runtime::class, 'embedSvgIcon'], ['needs_environment' => true]),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user