var/cache/dev/twig/a9/a9e4586a9f7efa40b9624a39b37a6c76.php line 35

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_07397edd51b7b633c7e392c0f357680f 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.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/content/NewsCars.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/content/NewsCars.html.twig"));
  35.         // line 1
  36.         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"falsefalsetrue1)) {
  37.             // line 2
  38.             echo "
  39.     <div class=\"row mt-5\">
  40.         ";
  41.             // line 5
  42.             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"falsefalsetrue5)) {
  43.                 // line 6
  44.                 echo "            <div class=\"col-12\">
  45.                 <h6>";
  46.                 // line 7
  47.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(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"falsefalsetrue7), 7$this->source), "html"nulltrue);
  48.                 echo "</h6>
  49.             </div>
  50.         ";
  51.             }
  52.             // line 10
  53.             echo "
  54.         ";
  55.             // line 12
  56.             $context['_parent'] = $context;
  57.             $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"falsefalsetrue12));
  58.             $context['loop'] = [
  59.               'parent' => $context['_parent'],
  60.               'index0' => 0,
  61.               'index'  => 1,
  62.               'first'  => true,
  63.             ];
  64.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  65.                 $length count($context['_seq']);
  66.                 $context['loop']['revindex0'] = $length 1;
  67.                 $context['loop']['revindex'] = $length;
  68.                 $context['loop']['length'] = $length;
  69.                 $context['loop']['last'] = === $length;
  70.             }
  71.             foreach ($context['_seq'] as $context["_key"] => $context["car"]) {
  72.                 // line 13
  73.                 echo "
  74.             ";
  75.                 // line 14
  76.                 if ((twig_get_attribute($this->env$this->source$context["car"], "objectType", [], "any"falsefalsetrue14) == "actual-car")) {
  77.                     // line 15
  78.                     echo "
  79.                 <div class=\"col-md-3 d-flex align-items-stretch flex-column\">
  80.                     ";
  81.                     // line 17
  82.                     $this->loadTemplate("product/product_teaser.html.twig""news/content/NewsCars.html.twig"17)->display(twig_array_merge($context, ["product" => $context["car"]]));
  83.                     // line 18
  84.                     echo "                </div>
  85.             ";
  86.                 }
  87.                 // line 21
  88.                 echo "
  89.         ";
  90.                 ++$context['loop']['index0'];
  91.                 ++$context['loop']['index'];
  92.                 $context['loop']['first'] = false;
  93.                 if (isset($context['loop']['length'])) {
  94.                     --$context['loop']['revindex0'];
  95.                     --$context['loop']['revindex'];
  96.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  97.                 }
  98.             }
  99.             $_parent $context['_parent'];
  100.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['car'], $context['_parent'], $context['loop']);
  101.             $context array_intersect_key($context$_parent) + $_parent;
  102.             // line 23
  103.             echo "    </div>
  104. ";
  105.         }
  106.         
  107.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  108.         
  109.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  110.     }
  111.     /**
  112.      * @codeCoverageIgnore
  113.      */
  114.     public function getTemplateName()
  115.     {
  116.         return "news/content/NewsCars.html.twig";
  117.     }
  118.     /**
  119.      * @codeCoverageIgnore
  120.      */
  121.     public function isTraitable()
  122.     {
  123.         return false;
  124.     }
  125.     /**
  126.      * @codeCoverageIgnore
  127.      */
  128.     public function getDebugInfo()
  129.     {
  130.         return array (  115 => 23,  100 => 21,  95 => 18,  93 => 17,  89 => 15,  87 => 14,  84 => 13,  67 => 12,  63 => 10,  57 => 7,  54 => 6,  52 => 5,  47 => 2,  45 => 1,);
  131.     }
  132.     public function getSourceContext()
  133.     {
  134.         return new Source("{% if item.relatedCars %}
  135.     <div class=\"row mt-5\">
  136.         {% if item.title %}
  137.             <div class=\"col-12\">
  138.                 <h6>{{ item.title }}</h6>
  139.             </div>
  140.         {% endif %}
  141.         {% for car in item.relatedCars %}
  142.             {% if car.objectType == 'actual-car' %}
  143.                 <div class=\"col-md-3 d-flex align-items-stretch flex-column\">
  144.                     {% include 'product/product_teaser.html.twig' with {'product': car} %}
  145.                 </div>
  146.             {% endif %}
  147.         {% endfor %}
  148.     </div>
  149. {% endif %}""news/content/NewsCars.html.twig""/var/www/dev-10/templates/news/content/NewsCars.html.twig");
  150.     }
  151.     
  152.     public function checkSecurity()
  153.     {
  154.         static $tags = array("if" => 1"for" => 12"include" => 17);
  155.         static $filters = array("escape" => 7);
  156.         static $functions = array();
  157.         try {
  158.             $this->sandbox->checkSecurity(
  159.                 ['if''for''include'],
  160.                 ['escape'],
  161.                 []
  162.             );
  163.         } catch (SecurityError $e) {
  164.             $e->setSourceContext($this->source);
  165.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  166.                 $e->setTemplateLine($tags[$e->getTagName()]);
  167.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  168.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  169.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  170.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  171.             }
  172.             throw $e;
  173.         }
  174.     }
  175. }