<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* news/content/NewsCars.html.twig */
class __TwigTemplate_4d5860ce272225335d09591582a31394 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", "news/content/NewsCars.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "news/content/NewsCars.html.twig"));
// line 1
if (twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 1, $this->source); })()), "relatedCars", [], "any", false, false, false, 1)) {
// line 2
echo "
<div class=\"row mt-5\">
";
// line 5
if (twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 5, $this->source); })()), "title", [], "any", false, false, false, 5)) {
// line 6
echo " <div class=\"col-12\">
<h6>";
// line 7
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 7, $this->source); })()), "title", [], "any", false, false, false, 7), "html", null, true);
echo "</h6>
</div>
";
}
// line 10
echo "
";
// line 12
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 12, $this->source); })()), "relatedCars", [], "any", false, false, false, 12));
$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["car"]) {
// line 13
echo "
";
// line 14
if ((twig_get_attribute($this->env, $this->source, $context["car"], "objectType", [], "any", false, false, false, 14) == "actual-car")) {
// line 15
echo "
<div class=\"col-md-3 d-flex align-items-stretch flex-column\">
";
// line 17
$this->loadTemplate("product/product_teaser.html.twig", "news/content/NewsCars.html.twig", 17)->display(twig_array_merge($context, ["product" => $context["car"]]));
// line 18
echo " </div>
";
}
// line 21
echo "
";
++$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['car'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 23
echo " </div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "news/content/NewsCars.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 113 => 23, 98 => 21, 93 => 18, 91 => 17, 87 => 15, 85 => 14, 82 => 13, 65 => 12, 61 => 10, 55 => 7, 52 => 6, 50 => 5, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if item.relatedCars %}
<div class=\"row mt-5\">
{% if item.title %}
<div class=\"col-12\">
<h6>{{ item.title }}</h6>
</div>
{% endif %}
{% for car in item.relatedCars %}
{% if car.objectType == 'actual-car' %}
<div class=\"col-md-3 d-flex align-items-stretch flex-column\">
{% include 'product/product_teaser.html.twig' with {'product': car} %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}", "news/content/NewsCars.html.twig", "/var/www/html/siteone/templates/news/content/NewsCars.html.twig");
}
}