var/cache/dev/twig/fb/fb8fe64c8a558f5214b8dbde02354495.php line 81

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/catalog/category/subcategories.html.twig */
  16. class __TwigTemplate_3f143c71c54d259b41073c676cae0edd 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/catalog/category/subcategories.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/catalog/category/subcategories.html.twig"));
  38. // line 1
  39. yield "<div class=\"subcategories\">
  40. ";
  41. // line 2
  42. $context['_parent'] = $context;
  43. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["children"]) || array_key_exists("children", $context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.', 2, $this->source); })()));
  44. $context['loop'] = [
  45. 'parent' => $context['_parent'],
  46. 'index0' => 0,
  47. 'index' => 1,
  48. 'first' => true,
  49. ];
  50. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  51. $length = count($context['_seq']);
  52. $context['loop']['revindex0'] = $length - 1;
  53. $context['loop']['revindex'] = $length;
  54. $context['loop']['length'] = $length;
  55. $context['loop']['last'] = 1 === $length;
  56. }
  57. foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  58. // line 3
  59. yield " <div class=\"title-ctn\">
  60. <h2 class=\"title\">";
  61. // line 4
  62. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["child"], "name", [], "any", false, false, false, 4), "html", null, true);
  63. yield " <a href=\"";
  64. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("category", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["child"], "id", [], "any", false, false, false, 4), "url" => CoreExtension::getAttribute($this->env, $this->source, $context["child"], "url", [], "any", false, false, false, 4)]), "html", null, true);
  65. yield "\">";
  66. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("tout voir", [], "messages");
  67. yield "</a></h2>
  68. <hr>
  69. </div>
  70. ";
  71. // line 7
  72. yield from $this->load("front/catalog/product/carousel.html.twig", 7)->unwrap()->yield(CoreExtension::merge($context, ["products" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["subcategories"]) || array_key_exists("subcategories", $context) ? $context["subcategories"] : (function () { throw new RuntimeError('Variable "subcategories" does not exist.', 7, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["child"], "id", [], "any", false, false, false, 7), [], "any", false, false, false, 7), "productTitleTag" => "h3"]));
  73. // line 8
  74. yield " ";
  75. ++$context['loop']['index0'];
  76. ++$context['loop']['index'];
  77. $context['loop']['first'] = false;
  78. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  79. --$context['loop']['revindex0'];
  80. --$context['loop']['revindex'];
  81. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  82. }
  83. }
  84. $_parent = $context['_parent'];
  85. unset($context['_seq'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  86. $context = array_intersect_key($context, $_parent) + $_parent;
  87. // line 9
  88. yield "</div>";
  89. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  90. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  91. yield from [];
  92. }
  93. /**
  94. * @codeCoverageIgnore
  95. */
  96. public function getTemplateName(): string
  97. {
  98. return "front/catalog/category/subcategories.html.twig";
  99. }
  100. /**
  101. * @codeCoverageIgnore
  102. */
  103. public function isTraitable(): bool
  104. {
  105. return false;
  106. }
  107. /**
  108. * @codeCoverageIgnore
  109. */
  110. public function getDebugInfo(): array
  111. {
  112. return array ( 97 => 9, 83 => 8, 81 => 7, 71 => 4, 68 => 3, 51 => 2, 48 => 1,);
  113. }
  114. public function getSourceContext(): Source
  115. {
  116. return new Source("<div class=\"subcategories\">
  117. {% for child in children %}
  118. <div class=\"title-ctn\">
  119. <h2 class=\"title\">{{ child.name }} <a href=\"{{ path(\x27category\x27,{id:child.id,\x27url\x27:child.url}) }}\">{% trans %}tout voir{% endtrans %}</a></h2>
  120. <hr>
  121. </div>
  122. {% include \x27front/catalog/product/carousel.html.twig\x27 with { products:attribute(subcategories,child.id), productTitleTag:\x27h3\x27 }%}
  123. {% endfor %}
  124. </div>", "front/catalog/category/subcategories.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/category/subcategories.html.twig");
  125. }
  126. }