var/cache/dev/twig/96/96cc7a910a1af0274f135e4c2cbd0a73.php line 77

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. /* front/catalog/category/subcategories.html.twig */
  15. class __TwigTemplate_cd8c0d7d0389d2f0488aa502500cef1a extends Template
  16. {
  17. private $source;
  18. private $macros = [];
  19. public function __construct(Environment $env)
  20. {
  21. parent::__construct($env);
  22. $this->source = $this->getSourceContext();
  23. $this->parent = false;
  24. $this->blocks = [
  25. ];
  26. }
  27. protected function doDisplay(array $context, array $blocks = [])
  28. {
  29. $macros = $this->macros;
  30. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/category/subcategories.html.twig"));
  32. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/category/subcategories.html.twig"));
  34. // line 1
  35. yield "<div class=\"subcategories\">
  36. ";
  37. // line 2
  38. $context['_parent'] = $context;
  39. $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); })()));
  40. $context['loop'] = [
  41. 'parent' => $context['_parent'],
  42. 'index0' => 0,
  43. 'index' => 1,
  44. 'first' => true,
  45. ];
  46. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  47. $length = count($context['_seq']);
  48. $context['loop']['revindex0'] = $length - 1;
  49. $context['loop']['revindex'] = $length;
  50. $context['loop']['length'] = $length;
  51. $context['loop']['last'] = 1 === $length;
  52. }
  53. foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  54. // line 3
  55. yield " <div class=\"title-ctn\">
  56. <h2 class=\"title\">";
  57. // line 4
  58. 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);
  59. yield " <a href=\"";
  60. 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);
  61. yield "\">";
  62. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("tout voir", [], "messages");
  63. yield "</a></h2>
  64. <hr>
  65. </div>
  66. ";
  67. // line 7
  68. yield from $this->loadTemplate("front/catalog/product/carousel.html.twig", "front/catalog/category/subcategories.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"]));
  69. // line 8
  70. yield " ";
  71. ++$context['loop']['index0'];
  72. ++$context['loop']['index'];
  73. $context['loop']['first'] = false;
  74. if (isset($context['loop']['length'])) {
  75. --$context['loop']['revindex0'];
  76. --$context['loop']['revindex'];
  77. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  78. }
  79. }
  80. $_parent = $context['_parent'];
  81. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  82. $context = array_intersect_key($context, $_parent) + $_parent;
  83. // line 9
  84. yield "</div>";
  85. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  86. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  87. return; yield '';
  88. }
  89. /**
  90. * @codeCoverageIgnore
  91. */
  92. public function getTemplateName()
  93. {
  94. return "front/catalog/category/subcategories.html.twig";
  95. }
  96. /**
  97. * @codeCoverageIgnore
  98. */
  99. public function isTraitable()
  100. {
  101. return false;
  102. }
  103. /**
  104. * @codeCoverageIgnore
  105. */
  106. public function getDebugInfo()
  107. {
  108. return array ( 93 => 9, 79 => 8, 77 => 7, 67 => 4, 64 => 3, 47 => 2, 44 => 1,);
  109. }
  110. public function getSourceContext()
  111. {
  112. return new Source("<div class=\"subcategories\">
  113. {% for child in children %}
  114. <div class=\"title-ctn\">
  115. <h2 class=\"title\">{{ child.name }} <a href=\"{{ path('category',{id:child.id,'url':child.url}) }}\">{% trans %}tout voir{% endtrans %}</a></h2>
  116. <hr>
  117. </div>
  118. {% include 'front/catalog/product/carousel.html.twig' with { products:attribute(subcategories,child.id), productTitleTag:'h3' }%}
  119. {% endfor %}
  120. </div>", "front/catalog/category/subcategories.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/category/subcategories.html.twig");
  121. }
  122. }