<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* front/catalog/product/view/references.html.twig */
class __TwigTemplate_e1be077931d64bcb561675c3c5d8bcf0 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/product/view/references.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/product/view/references.html.twig"));
// line 1
yield "<div class=\"references\">
";
// line 2
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))) {
// line 3
yield " ";
$context['_parent'] = $context;
$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));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
// line 4
yield " ";
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))) {
// line 5
yield " ";
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"]]));
// line 6
yield " ";
}
// line 7
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 8
yield " ";
} else {
// line 9
yield " ";
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); })())]));
// line 10
yield " ";
}
// line 11
yield "</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "front/catalog/product/view/references.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 99 => 11, 96 => 10, 93 => 9, 90 => 8, 76 => 7, 73 => 6, 70 => 5, 67 => 4, 49 => 3, 47 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"references\">
{% if product.children|length %}
{% for p in product.children %}
{% if not p.isStopped() and p.isActive() and product.hasPrice(priceGroup) %}
{% include 'front/catalog/product/view/reference-line.html.twig' with {product:p} %}
{% endif %}
{% endfor %}
{% else %}
{% include 'front/catalog/product/view/reference-line.html.twig' with {product:product} %}
{% endif %}
</div>", "front/catalog/product/view/references.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/product/view/references.html.twig");
}
}