var/cache/dev/twig/5c/5c6dec079ec90c6ef7162d756975fbbd.php line 79

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* front/modules/featured/block.html.twig */
  16. class __TwigTemplate_0a20ee33534f69900a2b556717207e95 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->parent = false;
  28. $this->blocks = [
  29. ];
  30. }
  31. protected function doDisplay(array $context, array $blocks = []): iterable
  32. {
  33. $macros = $this->macros;
  34. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/modules/featured/block.html.twig"));
  36. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/modules/featured/block.html.twig"));
  38. // line 1
  39. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 1, $this->source); })()), "data", [], "any", false, false, false, 1), "products", [], "any", false, false, false, 1)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  40. // line 2
  41. yield " ";
  42. $context["title"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 2, $this->source); })()), "data", [], "any", false, false, false, 2), "titleFr", [], "any", false, false, false, 2);
  43. // line 3
  44. yield " ";
  45. if (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), "getLocale", [], "method", false, false, false, 3) == "en") && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 3, $this->source); })()), "data", [], "any", false, false, false, 3), "titleEn", [], "any", false, false, false, 3))) {
  46. // line 4
  47. yield " ";
  48. $context["title"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 4, $this->source); })()), "data", [], "any", false, false, false, 4), "titleEn", [], "any", false, false, false, 4);
  49. // line 5
  50. yield " ";
  51. }
  52. // line 6
  53. yield " <div class=\"module module-product\">
  54. ";
  55. // line 7
  56. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  57. // line 8
  58. yield " <div class=\"admin-tools\">
  59. <a href=\"";
  60. // line 9
  61. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_modulefeatured_edit", ["hookId" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 9, $this->source); })()), "id", [], "any", false, false, false, 9)]), "html", null, true);
  62. yield "\" class=\"admin-update\" target=\"_blank\">modifier</a>
  63. </div>
  64. ";
  65. }
  66. // line 12
  67. yield " <div class=\"ctn\">
  68. ";
  69. // line 13
  70. yield from $this->load("front/catalog/product/carousel.html.twig", 13)->unwrap()->yield(CoreExtension::merge($context, ["products" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 13, $this->source); })()), "data", [], "any", false, false, false, 13), "products", [], "any", false, false, false, 13), "title" => (isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 13, $this->source); })()), "productTitleTag" => "h2"]));
  71. // line 14
  72. yield " </div>
  73. </div>
  74. ";
  75. }
  76. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  77. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  78. yield from [];
  79. }
  80. /**
  81. * @codeCoverageIgnore
  82. */
  83. public function getTemplateName(): string
  84. {
  85. return "front/modules/featured/block.html.twig";
  86. }
  87. /**
  88. * @codeCoverageIgnore
  89. */
  90. public function isTraitable(): bool
  91. {
  92. return false;
  93. }
  94. /**
  95. * @codeCoverageIgnore
  96. */
  97. public function getDebugInfo(): array
  98. {
  99. return array ( 81 => 14, 79 => 13, 76 => 12, 70 => 9, 67 => 8, 65 => 7, 62 => 6, 59 => 5, 56 => 4, 53 => 3, 50 => 2, 48 => 1,);
  100. }
  101. public function getSourceContext(): Source
  102. {
  103. return new Source("{% if module.data.products %}
  104. {% set title = module.data.titleFr %}
  105. {% if (app.request.getLocale() == 'en') and module.data.titleEn %}
  106. {% set title = module.data.titleEn %}
  107. {% endif %}
  108. <div class=\"module module-product\">
  109. {% if is_granted('ROLE_ADMIN') %}
  110. <div class=\"admin-tools\">
  111. <a href=\"{{ path('admin_modulefeatured_edit',{hookId:module.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier</a>
  112. </div>
  113. {% endif %}
  114. <div class=\"ctn\">
  115. {% include 'front/catalog/product/carousel.html.twig' with { products:module.data.products, title:title, productTitleTag:'h2' } %}
  116. </div>
  117. </div>
  118. {% endif %}", "front/modules/featured/block.html.twig", "/var/www/dogcat.com/v2-test/templates/front/modules/featured/block.html.twig");
  119. }
  120. }