var/cache/dev/twig/35/3504c27aa4cdb53252cc2d74c2fa9f39.php line 98

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/references.html.twig */
  16. class __TwigTemplate_0e4cd32290fac6649b057d76ad859eff 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/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/product/view/references.html.twig"));
  38. // line 1
  39. yield "<div class=\"references\">
  40. ";
  41. // line 2
  42. if ((($tmp = Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 2, $this->source); })()), "children", [], "any", false, false, false, 2))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  43. // line 3
  44. yield " ";
  45. $context['_parent'] = $context;
  46. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 3, $this->source); })()), "children", [], "any", false, false, false, 3));
  47. $context['loop'] = [
  48. 'parent' => $context['_parent'],
  49. 'index0' => 0,
  50. 'index' => 1,
  51. 'first' => true,
  52. ];
  53. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  54. $length = count($context['_seq']);
  55. $context['loop']['revindex0'] = $length - 1;
  56. $context['loop']['revindex'] = $length;
  57. $context['loop']['length'] = $length;
  58. $context['loop']['last'] = 1 === $length;
  59. }
  60. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  61. // line 4
  62. yield " ";
  63. if ((( !CoreExtension::getAttribute($this->env, $this->source, $context["p"], "isStopped", [], "method", false, false, false, 4) && CoreExtension::getAttribute($this->env, $this->source, $context["p"], "isActive", [], "method", false, false, false, 4)) && CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 4, $this->source); })()), "hasPrice", [(isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 4, $this->source); })())], "method", false, false, false, 4))) {
  64. // line 5
  65. yield " ";
  66. yield from $this->load("front/catalog/product/view/reference-line.html.twig", 5)->unwrap()->yield(CoreExtension::merge($context, ["product" => $context["p"]]));
  67. // line 6
  68. yield " ";
  69. }
  70. // line 7
  71. yield " ";
  72. ++$context['loop']['index0'];
  73. ++$context['loop']['index'];
  74. $context['loop']['first'] = false;
  75. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  76. --$context['loop']['revindex0'];
  77. --$context['loop']['revindex'];
  78. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  79. }
  80. }
  81. $_parent = $context['_parent'];
  82. unset($context['_seq'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  83. $context = array_intersect_key($context, $_parent) + $_parent;
  84. // line 8
  85. yield " ";
  86. } else {
  87. // line 9
  88. yield " ";
  89. yield from $this->load("front/catalog/product/view/reference-line.html.twig", 9)->unwrap()->yield(CoreExtension::merge($context, ["product" => (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 9, $this->source); })())]));
  90. // line 10
  91. yield " ";
  92. }
  93. // line 11
  94. yield "</div>";
  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/references.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 ( 103 => 11, 100 => 10, 97 => 9, 94 => 8, 80 => 7, 77 => 6, 74 => 5, 71 => 4, 53 => 3, 51 => 2, 48 => 1,);
  119. }
  120. public function getSourceContext(): Source
  121. {
  122. return new Source("<div class=\"references\">
  123. {% if product.children|length %}
  124. {% for p in product.children %}
  125. {% if not p.isStopped() and p.isActive() and product.hasPrice(priceGroup) %}
  126. {% include \x27front/catalog/product/view/reference-line.html.twig\x27 with {product:p} %}
  127. {% endif %}
  128. {% endfor %}
  129. {% else %}
  130. {% include \x27front/catalog/product/view/reference-line.html.twig\x27 with {product:product} %}
  131. {% endif %}
  132. </div>", "front/catalog/product/view/references.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/product/view/references.html.twig");
  133. }
  134. }