|
- <?php
-
- namespace Lc\CaracoleBundle\Twig;
-
- use Twig\Extension\AbstractExtension;
- use Twig\TwigFunction;
-
-
- class ToolsTwigExtension extends AbstractExtension
- {
-
- public function getFunctions()
- {
- return array(
- new TwigFunction('die', [$this, 'simuleDie']),
- );
- }
-
- public function simuleDie(string $message = null)
- {
- die($message);
- }
-
- }
|