Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Twig;
  4.  
  5. use App\Twig\AppRuntime;
  6. use Twig\Extension\AbstractExtension;
  7. use Twig\TwigFilter;
  8.  
  9. class AppExtension extends AbstractExtension
  10. {
  11. public function getFilters()
  12. {
  13. return [
  14. // the logic of this filter is now implemented in a different class
  15. new TwigFilter('price', [AppRuntime::class, 'formatPrice']),
  16. ];
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement