var/cache/dev/twig/9d/9d65f35e1b59d7f9d511241b49223d5b.php line 34

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/view/references.html.twig */
  15. class __TwigTemplate_e1be077931d64bcb561675c3c5d8bcf0 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/view/references.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/view/references.html.twig"));
  34. // line 1
  35. yield "<div class=\"references\">
  36. ";
  37. // line 2
  38. if (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))) {
  39. // line 3
  40. yield " ";
  41. $context['_parent'] = $context;
  42. $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));
  43. $context['loop'] = [
  44. 'parent' => $context['_parent'],
  45. 'index0' => 0,
  46. 'index' => 1,
  47. 'first' => true,
  48. ];
  49. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  50. $length = count($context['_seq']);
  51. $context['loop']['revindex0'] = $length - 1;
  52. $context['loop']['revindex'] = $length;
  53. $context['loop']['length'] = $length;
  54. $context['loop']['last'] = 1 === $length;
  55. }
  56. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  57. // line 4
  58. yield " ";
  59. 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))) {
  60. // line 5
  61. yield " ";
  62. yield from $this->loadTemplate("front/catalog/product/view/reference-line.html.twig", "front/catalog/product/view/references.html.twig", 5)->unwrap()->yield(CoreExtension::merge($context, ["product" => $context["p"]]));
  63. // line 6
  64. yield " ";
  65. }
  66. // line 7
  67. yield " ";
  68. ++$context['loop']['index0'];
  69. ++$context['loop']['index'];
  70. $context['loop']['first'] = false;
  71. if (isset($context['loop']['length'])) {
  72. --$context['loop']['revindex0'];
  73. --$context['loop']['revindex'];
  74. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  75. }
  76. }
  77. $_parent = $context['_parent'];
  78. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  79. $context = array_intersect_key($context, $_parent) + $_parent;
  80. // line 8
  81. yield " ";
  82. } else {
  83. // line 9
  84. yield " ";
  85. yield from $this->loadTemplate("front/catalog/product/view/reference-line.html.twig", "front/catalog/product/view/references.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); })())]));
  86. // line 10
  87. yield " ";
  88. }
  89. // line 11
  90. yield "</div>";
  91. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  92. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  93. return; yield '';
  94. }
  95. /**
  96. * @codeCoverageIgnore
  97. */
  98. public function getTemplateName()
  99. {
  100. return "front/catalog/product/view/references.html.twig";
  101. }
  102. /**
  103. * @codeCoverageIgnore
  104. */
  105. public function isTraitable()
  106. {
  107. return false;
  108. }
  109. /**
  110. * @codeCoverageIgnore
  111. */
  112. public function getDebugInfo()
  113. {
  114. return array ( 99 => 11, 96 => 10, 93 => 9, 90 => 8, 76 => 7, 73 => 6, 70 => 5, 67 => 4, 49 => 3, 47 => 2, 44 => 1,);
  115. }
  116. public function getSourceContext()
  117. {
  118. return new Source("<div class=\"references\">
  119. {% if product.children|length %}
  120. {% for p in product.children %}
  121. {% if not p.isStopped() and p.isActive() and product.hasPrice(priceGroup) %}
  122. {% include 'front/catalog/product/view/reference-line.html.twig' with {product:p} %}
  123. {% endif %}
  124. {% endfor %}
  125. {% else %}
  126. {% include 'front/catalog/product/view/reference-line.html.twig' with {product:product} %}
  127. {% endif %}
  128. </div>", "front/catalog/product/view/references.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/product/view/references.html.twig");
  129. }
  130. }