var/cache/dev/twig/8e/8ed7cb1cf8c9ac0350ecffeb011b8c9f.php line 33

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* news/content/NewsCars.html.twig */
  14. class __TwigTemplate_4d5860ce272225335d09591582a31394 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/content/NewsCars.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/content/NewsCars.html.twig"));
  33.         // line 1
  34.         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"falsefalsefalse1)) {
  35.             // line 2
  36.             echo "
  37.     <div class=\"row mt-5\">
  38.         ";
  39.             // line 5
  40.             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"falsefalsefalse5)) {
  41.                 // line 6
  42.                 echo "            <div class=\"col-12\">
  43.                 <h6>";
  44.                 // line 7
  45.                 echo twig_escape_filter($this->envtwig_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"falsefalsefalse7), "html"nulltrue);
  46.                 echo "</h6>
  47.             </div>
  48.         ";
  49.             }
  50.             // line 10
  51.             echo "
  52.         ";
  53.             // line 12
  54.             $context['_parent'] = $context;
  55.             $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"falsefalsefalse12));
  56.             $context['loop'] = [
  57.               'parent' => $context['_parent'],
  58.               'index0' => 0,
  59.               'index'  => 1,
  60.               'first'  => true,
  61.             ];
  62.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  63.                 $length count($context['_seq']);
  64.                 $context['loop']['revindex0'] = $length 1;
  65.                 $context['loop']['revindex'] = $length;
  66.                 $context['loop']['length'] = $length;
  67.                 $context['loop']['last'] = === $length;
  68.             }
  69.             foreach ($context['_seq'] as $context["_key"] => $context["car"]) {
  70.                 // line 13
  71.                 echo "
  72.             ";
  73.                 // line 14
  74.                 if ((twig_get_attribute($this->env$this->source$context["car"], "objectType", [], "any"falsefalsefalse14) == "actual-car")) {
  75.                     // line 15
  76.                     echo "
  77.                 <div class=\"col-md-3 d-flex align-items-stretch flex-column\">
  78.                     ";
  79.                     // line 17
  80.                     $this->loadTemplate("product/product_teaser.html.twig""news/content/NewsCars.html.twig"17)->display(twig_array_merge($context, ["product" => $context["car"]]));
  81.                     // line 18
  82.                     echo "                </div>
  83.             ";
  84.                 }
  85.                 // line 21
  86.                 echo "
  87.         ";
  88.                 ++$context['loop']['index0'];
  89.                 ++$context['loop']['index'];
  90.                 $context['loop']['first'] = false;
  91.                 if (isset($context['loop']['length'])) {
  92.                     --$context['loop']['revindex0'];
  93.                     --$context['loop']['revindex'];
  94.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  95.                 }
  96.             }
  97.             $_parent $context['_parent'];
  98.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['car'], $context['_parent'], $context['loop']);
  99.             $context array_intersect_key($context$_parent) + $_parent;
  100.             // line 23
  101.             echo "    </div>
  102. ";
  103.         }
  104.         
  105.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  106.         
  107.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  108.     }
  109.     public function getTemplateName()
  110.     {
  111.         return "news/content/NewsCars.html.twig";
  112.     }
  113.     public function isTraitable()
  114.     {
  115.         return false;
  116.     }
  117.     public function getDebugInfo()
  118.     {
  119.         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,);
  120.     }
  121.     public function getSourceContext()
  122.     {
  123.         return new Source("{% if item.relatedCars %}
  124.     <div class=\"row mt-5\">
  125.         {% if item.title %}
  126.             <div class=\"col-12\">
  127.                 <h6>{{ item.title }}</h6>
  128.             </div>
  129.         {% endif %}
  130.         {% for car in item.relatedCars %}
  131.             {% if car.objectType == 'actual-car' %}
  132.                 <div class=\"col-md-3 d-flex align-items-stretch flex-column\">
  133.                     {% include 'product/product_teaser.html.twig' with {'product': car} %}
  134.                 </div>
  135.             {% endif %}
  136.         {% endfor %}
  137.     </div>
  138. {% endif %}""news/content/NewsCars.html.twig""/var/www/html/siteone/templates/news/content/NewsCars.html.twig");
  139.     }
  140. }