var/cache/dev/twig/aa/aa519c71570e58667462e686516fc9a1.php line 103

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