var/cache/dev/twig/5b/5bb708cc34a3c7afebcdbd1a587d5f00.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/carousel.html.twig */
  16. class __TwigTemplate_3c4682575ea00f0a0ee9d04815a2249a 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/carousel.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/carousel.html.twig"));
  38. // line 1
  39. if ((($tmp = !array_key_exists("withWrapper", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  40. // line 2
  41. yield " ";
  42. $context["withWrapper"] = false;
  43. }
  44. // line 4
  45. if ((($tmp = !array_key_exists("titleTag", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  46. // line 5
  47. yield " ";
  48. $context["titleTag"] = "div";
  49. }
  50. // line 7
  51. if ((($tmp = (isset($context["withWrapper"]) || array_key_exists("withWrapper", $context) ? $context["withWrapper"] : (function () { throw new RuntimeError('Variable "withWrapper" does not exist.', 7, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  52. // line 8
  53. yield "<div class=\"product-carousel-ctn\">
  54. <div class=\"ctn\">
  55. ";
  56. }
  57. // line 11
  58. yield "<div class=\"product-list-ctn\">
  59. ";
  60. // line 12
  61. if ((array_key_exists("title", $context) && (isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 12, $this->source); })()))) {
  62. // line 13
  63. yield " <div class=\"title-ctn\">
  64. <";
  65. // line 14
  66. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["titleTag"]) || array_key_exists("titleTag", $context) ? $context["titleTag"] : (function () { throw new RuntimeError('Variable "titleTag" does not exist.', 14, $this->source); })()), "html", null, true);
  67. yield " class=\"title\">";
  68. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 14, $this->source); })()), "html", null, true);
  69. yield "</";
  70. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["titleTag"]) || array_key_exists("titleTag", $context) ? $context["titleTag"] : (function () { throw new RuntimeError('Variable "titleTag" does not exist.', 14, $this->source); })()), "html", null, true);
  71. yield ">
  72. <hr>
  73. </div>
  74. ";
  75. }
  76. // line 18
  77. yield " <ul class=\"product-list product-carousel\">
  78. ";
  79. // line 19
  80. $context['_parent'] = $context;
  81. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 19, $this->source); })()));
  82. $context['loop'] = [
  83. 'parent' => $context['_parent'],
  84. 'index0' => 0,
  85. 'index' => 1,
  86. 'first' => true,
  87. ];
  88. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  89. $length = count($context['_seq']);
  90. $context['loop']['revindex0'] = $length - 1;
  91. $context['loop']['revindex'] = $length;
  92. $context['loop']['length'] = $length;
  93. $context['loop']['last'] = 1 === $length;
  94. }
  95. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  96. // line 20
  97. yield " ";
  98. yield from $this->load("front/catalog/product/view/list-item.html.twig", 20)->unwrap()->yield(CoreExtension::merge($context, ["product" => $context["p"]]));
  99. // line 21
  100. yield " ";
  101. ++$context['loop']['index0'];
  102. ++$context['loop']['index'];
  103. $context['loop']['first'] = false;
  104. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  105. --$context['loop']['revindex0'];
  106. --$context['loop']['revindex'];
  107. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  108. }
  109. }
  110. $_parent = $context['_parent'];
  111. unset($context['_seq'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  112. $context = array_intersect_key($context, $_parent) + $_parent;
  113. // line 22
  114. yield " </ul>
  115. </div>
  116. ";
  117. // line 24
  118. if ((($tmp = (isset($context["withWrapper"]) || array_key_exists("withWrapper", $context) ? $context["withWrapper"] : (function () { throw new RuntimeError('Variable "withWrapper" does not exist.', 24, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  119. // line 25
  120. yield " </div>
  121. </div>
  122. ";
  123. }
  124. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  125. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  126. yield from [];
  127. }
  128. /**
  129. * @codeCoverageIgnore
  130. */
  131. public function getTemplateName(): string
  132. {
  133. return "front/catalog/product/carousel.html.twig";
  134. }
  135. /**
  136. * @codeCoverageIgnore
  137. */
  138. public function isTraitable(): bool
  139. {
  140. return false;
  141. }
  142. /**
  143. * @codeCoverageIgnore
  144. */
  145. public function getDebugInfo(): array
  146. {
  147. return array ( 129 => 25, 127 => 24, 123 => 22, 109 => 21, 106 => 20, 89 => 19, 86 => 18, 75 => 14, 72 => 13, 70 => 12, 67 => 11, 62 => 8, 60 => 7, 56 => 5, 54 => 4, 50 => 2, 48 => 1,);
  148. }
  149. public function getSourceContext(): Source
  150. {
  151. return new Source("{% if withWrapper is not defined %}
  152. {% set withWrapper = false %}
  153. {% endif %}
  154. {% if titleTag is not defined %}
  155. {% set titleTag = 'div' %}
  156. {% endif %}
  157. {% if withWrapper %}
  158. <div class=\"product-carousel-ctn\">
  159. <div class=\"ctn\">
  160. {% endif %}
  161. <div class=\"product-list-ctn\">
  162. {% if title is defined and title %}
  163. <div class=\"title-ctn\">
  164. <{{ titleTag }} class=\"title\">{{ title }}</{{ titleTag }}>
  165. <hr>
  166. </div>
  167. {% endif %}
  168. <ul class=\"product-list product-carousel\">
  169. {% for p in products %}
  170. {% include 'front/catalog/product/view/list-item.html.twig' with {product:p} %}
  171. {% endfor %}
  172. </ul>
  173. </div>
  174. {% if withWrapper %}
  175. </div>
  176. </div>
  177. {% endif %}", "front/catalog/product/carousel.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/product/carousel.html.twig");
  178. }
  179. }