Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Twig;
- use App\Twig\AppRuntime;
- use Twig\Extension\AbstractExtension;
- use Twig\TwigFilter;
- class AppExtension extends AbstractExtension
- {
- public function getFilters()
- {
- return [
- // the logic of this filter is now implemented in a different class
- new TwigFilter('price', [AppRuntime::class, 'formatPrice']),
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement