You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
395B

  1. <?php
  2. namespace Lc\CaracoleBundle\Twig;
  3. use Twig\Extension\AbstractExtension;
  4. use Twig\TwigFunction;
  5. class ToolsTwigExtension extends AbstractExtension
  6. {
  7. public function getFunctions()
  8. {
  9. return array(
  10. new TwigFunction('die', [$this, 'simuleDie']),
  11. );
  12. }
  13. public function simuleDie(string $message = null)
  14. {
  15. die($message);
  16. }
  17. }