var/cache/dev/twig/09/09f773c510c6ee1ea2dbfc767349e2e1.php line 38

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/product/view/list.html.twig */
  16. class __TwigTemplate_d62342dfd70791d8c9574cc53e7ffeff 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/product/view/list.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/product/view/list.html.twig"));
  38. // line 1
  39. if ((($tmp = !array_key_exists("wrapperTag", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  40. // line 2
  41. yield " ";
  42. $context["wrapperTag"] = "ul";
  43. }
  44. // line 4
  45. if ((($tmp = (isset($context["wrapperTag"]) || array_key_exists("wrapperTag", $context) ? $context["wrapperTag"] : (function () { throw new RuntimeError('Variable "wrapperTag" does not exist.', 4, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  46. // line 5
  47. yield "<";
  48. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["wrapperTag"]) || array_key_exists("wrapperTag", $context) ? $context["wrapperTag"] : (function () { throw new RuntimeError('Variable "wrapperTag" does not exist.', 5, $this->source); })()), "html", null, true);
  49. yield " class=\"product-list\">
  50. ";
  51. }
  52. // line 7
  53. yield " ";
  54. $context['_parent'] = $context;
  55. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 7, $this->source); })()));
  56. $context['loop'] = [
  57. 'parent' => $context['_parent'],
  58. 'index0' => 0,
  59. 'index' => 1,
  60. 'first' => true,
  61. ];
  62. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  63. $length = count($context['_seq']);
  64. $context['loop']['revindex0'] = $length - 1;
  65. $context['loop']['revindex'] = $length;
  66. $context['loop']['length'] = $length;
  67. $context['loop']['last'] = 1 === $length;
  68. }
  69. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  70. // line 8
  71. yield " ";
  72. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["p"], "model", [], "any", false, false, false, 8)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  73. // line 9
  74. yield " ";
  75. yield from $this->load("front/catalog/model/view/list-item.html.twig", 9)->unwrap()->yield(CoreExtension::merge($context, ["model" => CoreExtension::getAttribute($this->env, $this->source, $context["p"], "topProductModel", [], "any", false, false, false, 9), "product" => $context["p"]]));
  76. // line 10
  77. yield " ";
  78. } else {
  79. // line 11
  80. yield " ";
  81. yield from $this->load("front/catalog/product/view/list-item.html.twig", 11)->unwrap()->yield(CoreExtension::merge($context, ["product" => $context["p"]]));
  82. // line 12
  83. yield " ";
  84. }
  85. // line 13
  86. yield " ";
  87. ++$context['loop']['index0'];
  88. ++$context['loop']['index'];
  89. $context['loop']['first'] = false;
  90. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  91. --$context['loop']['revindex0'];
  92. --$context['loop']['revindex'];
  93. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  94. }
  95. }
  96. $_parent = $context['_parent'];
  97. unset($context['_seq'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  98. $context = array_intersect_key($context, $_parent) + $_parent;
  99. // line 14
  100. if ((($tmp = (isset($context["wrapperTag"]) || array_key_exists("wrapperTag", $context) ? $context["wrapperTag"] : (function () { throw new RuntimeError('Variable "wrapperTag" does not exist.', 14, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  101. // line 15
  102. yield "</";
  103. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["wrapperTag"]) || array_key_exists("wrapperTag", $context) ? $context["wrapperTag"] : (function () { throw new RuntimeError('Variable "wrapperTag" does not exist.', 15, $this->source); })()), "html", null, true);
  104. yield ">
  105. ";
  106. }
  107. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  108. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  109. yield from [];
  110. }
  111. /**
  112. * @codeCoverageIgnore
  113. */
  114. public function getTemplateName(): string
  115. {
  116. return "front/catalog/product/view/list.html.twig";
  117. }
  118. /**
  119. * @codeCoverageIgnore
  120. */
  121. public function isTraitable(): bool
  122. {
  123. return false;
  124. }
  125. /**
  126. * @codeCoverageIgnore
  127. */
  128. public function getDebugInfo(): array
  129. {
  130. return array ( 111 => 15, 109 => 14, 95 => 13, 92 => 12, 89 => 11, 86 => 10, 83 => 9, 80 => 8, 62 => 7, 56 => 5, 54 => 4, 50 => 2, 48 => 1,);
  131. }
  132. public function getSourceContext(): Source
  133. {
  134. return new Source("{% if wrapperTag is not defined %}
  135. {% set wrapperTag = \x27ul\x27 %}
  136. {% endif %}
  137. {% if wrapperTag %}
  138. <{{ wrapperTag }} class=\"product-list\">
  139. {% endif %}
  140. {% for p in products %}
  141. {% if p.model %}
  142. {% include \x27front/catalog/model/view/list-item.html.twig\x27 with {model:p.topProductModel, product:p} %}
  143. {% else %}
  144. {% include \x27front/catalog/product/view/list-item.html.twig\x27 with {product:p} %}
  145. {% endif %}
  146. {% endfor %}
  147. {% if wrapperTag %}
  148. </{{ wrapperTag }}>
  149. {% endif %}", "front/catalog/product/view/list.html.twig", "/var/www/dogcat.com/pim/templates/front/catalog/product/view/list.html.twig");
  150. }
  151. }