var/cache/dev/twig/9e/9e80d9684b38f6d6c9fe8b7765a1a96d.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/product/view/list.html.twig */
  16. class __TwigTemplate_677615378c97f2c37564fd60b04d7d76 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. yield from $this->load("front/catalog/product/view/list-item.html.twig", 8)->unwrap()->yield(CoreExtension::merge($context, ["product" => $context["p"]]));
  73. // line 9
  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['p'], $context['_parent'], $context['loop']);
  86. $context = array_intersect_key($context, $_parent) + $_parent;
  87. // line 10
  88. if ((($tmp = (isset($context["wrapperTag"]) || array_key_exists("wrapperTag", $context) ? $context["wrapperTag"] : (function () { throw new RuntimeError('Variable "wrapperTag" does not exist.', 10, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  89. // line 11
  90. yield "</";
  91. 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.', 11, $this->source); })()), "html", null, true);
  92. yield ">
  93. ";
  94. }
  95. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  96. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  97. yield from [];
  98. }
  99. /**
  100. * @codeCoverageIgnore
  101. */
  102. public function getTemplateName(): string
  103. {
  104. return "front/catalog/product/view/list.html.twig";
  105. }
  106. /**
  107. * @codeCoverageIgnore
  108. */
  109. public function isTraitable(): bool
  110. {
  111. return false;
  112. }
  113. /**
  114. * @codeCoverageIgnore
  115. */
  116. public function getDebugInfo(): array
  117. {
  118. return array ( 99 => 11, 97 => 10, 83 => 9, 80 => 8, 62 => 7, 56 => 5, 54 => 4, 50 => 2, 48 => 1,);
  119. }
  120. public function getSourceContext(): Source
  121. {
  122. return new Source("{% if wrapperTag is not defined %}
  123. {% set wrapperTag = 'ul' %}
  124. {% endif %}
  125. {% if wrapperTag %}
  126. <{{ wrapperTag }} class=\"product-list\">
  127. {% endif %}
  128. {% for p in products %}
  129. {% include 'front/catalog/product/view/list-item.html.twig' with {product:p} %}
  130. {% endfor %}
  131. {% if wrapperTag %}
  132. </{{ wrapperTag }}>
  133. {% endif %}", "front/catalog/product/view/list.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/product/view/list.html.twig");
  134. }
  135. }