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.

41 lines
1.3KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Twig;
  3. use Lc\CaracoleBundle\Builder\Order\OrderShopBuilder;
  4. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  5. use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
  6. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  7. use Lc\CaracoleBundle\Model\User\UserMerchantInterface;
  8. use Lc\CaracoleBundle\Repository\Config\TaxRateStore;
  9. use Lc\CaracoleBundle\Repository\Config\UnitStore;
  10. use Lc\CaracoleBundle\Repository\Merchant\MerchantStore;
  11. use Lc\CaracoleBundle\Repository\Order\OrderShopStore;
  12. use Lc\CaracoleBundle\Repository\Product\ProductCategoryStore;
  13. use Lc\CaracoleBundle\Repository\Reminder\ReminderStore;
  14. use Lc\CaracoleBundle\Repository\Section\SectionStore;
  15. use Lc\CaracoleBundle\Resolver\MerchantResolver;
  16. use Lc\CaracoleBundle\Resolver\SectionResolver;
  17. use Lc\CaracoleBundle\Resolver\VisitorResolver;
  18. use Lc\SovBundle\Solver\Setting\SettingSolver;
  19. use Symfony\Component\Security\Core\Security;
  20. use Twig\Extension\AbstractExtension;
  21. use Twig\TwigFunction;
  22. class ToolsTwigExtension extends AbstractExtension
  23. {
  24. public function getFunctions()
  25. {
  26. return array(
  27. new TwigFunction('die', [$this, 'simuleDie']),
  28. );
  29. }
  30. public function simuleDie(string $message = null)
  31. {
  32. die($message);
  33. }
  34. }