var/cache/dev/twig/29/297d57061bf7b4946c8cbbdd87e33154.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/model/view/references.html.twig */
  16. class __TwigTemplate_959a9b99b5cf8b1ca5e392da5209d13c 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/model/view/references.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/model/view/references.html.twig"));
  38. // line 1
  39. yield "<div class=\"attributes\">
  40. ";
  41. // line 3
  42. $context['_parent'] = $context;
  43. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 3, $this->source); })()));
  44. $context['loop'] = [
  45. 'parent' => $context['_parent'],
  46. 'index0' => 0,
  47. 'index' => 1,
  48. 'first' => true,
  49. ];
  50. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  51. $length = count($context['_seq']);
  52. $context['loop']['revindex0'] = $length - 1;
  53. $context['loop']['revindex'] = $length;
  54. $context['loop']['length'] = $length;
  55. $context['loop']['last'] = 1 === $length;
  56. }
  57. foreach ($context['_seq'] as $context["_key"] => $context["attr"]) {
  58. // line 4
  59. yield " ";
  60. if ((CoreExtension::getAttribute($this->env, $this->source, $context["attr"], "display", [], "any", false, false, false, 4) == "combobox")) {
  61. // line 5
  62. yield " ";
  63. yield from $this->load("front/catalog/model/view/variants/combobox.html.twig", 5)->unwrap()->yield($context);
  64. // line 6
  65. yield " ";
  66. } elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["attr"], "display", [], "any", false, false, false, 6) == "color")) {
  67. // line 7
  68. yield " ";
  69. yield from $this->load("front/catalog/model/view/variants/color.html.twig", 7)->unwrap()->yield($context);
  70. // line 8
  71. yield " ";
  72. } elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["attr"], "display", [], "any", false, false, false, 8) == "picture")) {
  73. // line 9
  74. yield " ";
  75. yield from $this->load("front/catalog/model/view/variants/picture.html.twig", 9)->unwrap()->yield($context);
  76. // line 10
  77. yield " ";
  78. } else {
  79. // line 11
  80. yield " ";
  81. yield from $this->load("front/catalog/model/view/variants/box.html.twig", 11)->unwrap()->yield($context);
  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['attr'], $context['_parent'], $context['loop']);
  98. $context = array_intersect_key($context, $_parent) + $_parent;
  99. // line 14
  100. yield "
  101. <div class=\"references\">
  102. ";
  103. // line 16
  104. $context['_parent'] = $context;
  105. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 16, $this->source); })()));
  106. $context['loop'] = [
  107. 'parent' => $context['_parent'],
  108. 'index0' => 0,
  109. 'index' => 1,
  110. 'first' => true,
  111. ];
  112. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  113. $length = count($context['_seq']);
  114. $context['loop']['revindex0'] = $length - 1;
  115. $context['loop']['revindex'] = $length;
  116. $context['loop']['length'] = $length;
  117. $context['loop']['last'] = 1 === $length;
  118. }
  119. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  120. // line 17
  121. yield " ";
  122. yield from $this->load("front/catalog/model/view/reference-line.html.twig", 17)->unwrap()->yield(CoreExtension::merge($context, ["product" => $context["p"]]));
  123. // line 18
  124. yield " ";
  125. ++$context['loop']['index0'];
  126. ++$context['loop']['index'];
  127. $context['loop']['first'] = false;
  128. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  129. --$context['loop']['revindex0'];
  130. --$context['loop']['revindex'];
  131. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  132. }
  133. }
  134. $_parent = $context['_parent'];
  135. unset($context['_seq'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  136. $context = array_intersect_key($context, $_parent) + $_parent;
  137. // line 19
  138. yield " </div>
  139. </div>";
  140. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  141. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  142. yield from [];
  143. }
  144. /**
  145. * @codeCoverageIgnore
  146. */
  147. public function getTemplateName(): string
  148. {
  149. return "front/catalog/model/view/references.html.twig";
  150. }
  151. /**
  152. * @codeCoverageIgnore
  153. */
  154. public function isTraitable(): bool
  155. {
  156. return false;
  157. }
  158. /**
  159. * @codeCoverageIgnore
  160. */
  161. public function getDebugInfo(): array
  162. {
  163. return array ( 148 => 19, 134 => 18, 131 => 17, 114 => 16, 110 => 14, 96 => 13, 93 => 12, 90 => 11, 87 => 10, 84 => 9, 81 => 8, 78 => 7, 75 => 6, 72 => 5, 69 => 4, 52 => 3, 48 => 1,);
  164. }
  165. public function getSourceContext(): Source
  166. {
  167. return new Source("<div class=\"attributes\">
  168. {% for attr in attributes %}
  169. {% if attr.display == \x27combobox\x27 %}
  170. {% include \x27front/catalog/model/view/variants/combobox.html.twig\x27 %}
  171. {% elseif attr.display == \x27color\x27 %}
  172. {% include \x27front/catalog/model/view/variants/color.html.twig\x27 %}
  173. {% elseif attr.display == \x27picture\x27 %}
  174. {% include \x27front/catalog/model/view/variants/picture.html.twig\x27 %}
  175. {% else %}
  176. {% include \x27front/catalog/model/view/variants/box.html.twig\x27 %}
  177. {% endif %}
  178. {% endfor %}
  179. <div class=\"references\">
  180. {% for p in products %}
  181. {% include \x27front/catalog/model/view/reference-line.html.twig\x27 with {product:p} %}
  182. {% endfor %}
  183. </div>
  184. </div>", "front/catalog/model/view/references.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/model/view/references.html.twig");
  185. }
  186. }