var/cache/dev/twig/1c/1c49c0e273655cd10d050345ead0ff44.php line 40

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. /* products-cat.html.twig */
  14. class __TwigTemplate_62e70a03969b0ae058b4dd628ea41094 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->blocks = [
  23.             'content' => [$this, 'block_content'],
  24.         ];
  25.         $this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "layout.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros = $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "products-cat.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "products-cat.html.twig"));
  40.         $this->parent = $this->loadTemplate("layout.html.twig", "products-cat.html.twig", 1);
  41.         $this->parent->display($context, array_merge($this->blocks, $blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 3
  48.     public function block_content($context, array $blocks = [])
  49.     {
  50.         $macros = $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  55.         // line 4
  56.         echo "
  57. ";
  58.         // line 5
  59.         $this->loadTemplate("includes/breadcrumb.html.twig", "products-cat.html.twig", 5)->display($context);
  60.         // line 6
  61.         echo "
  62. <section class=\"section-filter\">
  63.     <div class=\"container-fluid\">
  64.         <div class=\"row align-items-center\">
  65.             <div class=\"col-auto\">
  66.                 <p class=\"h1\">";
  67.         // line 11
  68.         echo twig_escape_filter($this->env, ((array_key_exists("category", $context)) ? (twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 11, $this->source); })()), "name", [], "any", false, false, true, 11)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Producten"))), "html", null, true);
  69.         echo "</p>
  70.             </div>
  71.         </div><!--/ .row -->
  72.     </div><!--/ .container -->
  73. </section>
  74. <section class=\"section-products\">
  75.     <div class=\"container-fluid\">
  76.         <div class=\"row\">
  77.             <div class=\"col-lg-12\">
  78.                 <div class=\"row\">
  79.                 ";
  80.         // line 22
  81.         $context['_parent'] = $context;
  82.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["category"], "getChildren", [], "any", false, false, true, 22));
  83.         foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
  84.             // line 23
  85.             echo "                    <div class=\"col-sm-6 col-lg-4 d-flex flex-column\">
  86.                         ";
  87.             // line 37
  88.             echo "
  89.                         <a href=\"";
  90.             // line 38
  91.             echo twig_escape_filter($this->env, $this->extensions['App\Twig\Extension\CategoryFilterExtension']->generateLink($this->sandbox->ensureToStringAllowed($context["category"], 38, $this->source)), "html", null, true);
  92.             echo "\" class=\"btn btn-icon h-100\">";
  93.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, true, 38), 38, $this->source), "html", null, true);
  94.             echo "</a>
  95.                     </div>
  96.                 ";
  97.         }
  98.         $_parent = $context['_parent'];
  99.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
  100.         $context = array_intersect_key($context, $_parent) + $_parent;
  101.         // line 41
  102.         echo "                </div><!--/ .row -->
  103.             </div>
  104.         </div><!--/ .row -->
  105.     </div><!--/ .container-fluid -->
  106. </section>
  107. ";
  108.         
  109.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  110.         
  111.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  112.     }
  113.     public function getTemplateName()
  114.     {
  115.         return "products-cat.html.twig";
  116.     }
  117.     public function isTraitable()
  118.     {
  119.         return false;
  120.     }
  121.     public function getDebugInfo()
  122.     {
  123.         return array (  117 => 41,  106 => 38,  103 => 37,  100 => 23,  96 => 22,  82 => 11,  75 => 6,  73 => 5,  70 => 4,  60 => 3,  37 => 1,);
  124.     }
  125.     public function getSourceContext()
  126.     {
  127.         return new Source("{% extends 'layout.html.twig' %}
  128. {% block content %}
  129. {% include 'includes/breadcrumb.html.twig' %}
  130. <section class=\"section-filter\">
  131.     <div class=\"container-fluid\">
  132.         <div class=\"row align-items-center\">
  133.             <div class=\"col-auto\">
  134.                 <p class=\"h1\">{{ category is defined ? category.name : 'Producten'|trans }}</p>
  135.             </div>
  136.         </div><!--/ .row -->
  137.     </div><!--/ .container -->
  138. </section>
  139. <section class=\"section-products\">
  140.     <div class=\"container-fluid\">
  141.         <div class=\"row\">
  142.             <div class=\"col-lg-12\">
  143.                 <div class=\"row\">
  144.                 {% for category in category.getChildren %}
  145.                     <div class=\"col-sm-6 col-lg-4 d-flex flex-column\">
  146.                         {# 
  147.                         <a href=\"{{ app_category_filter_generate_link(category) }}\" class=\"category\">
  148.                             <div class=\"category__title\"><div class=\"text\">{{ category.name }}</div></div>
  149.                             <div class=\"category__img\">
  150.                             {% if category.photo %}
  151.                                 {{ category.photo.thumbnail('CategoryThumbnail').html|raw }}
  152.                             {% else %}
  153.                                 <img class=\"img-fluid\" src=\"/img/placeholder-category.png\">
  154.                             {% endif %}
  155.                             </div>
  156.                         </a>
  157.                         #}
  158.                         <a href=\"{{ app_category_filter_generate_link(category) }}\" class=\"btn btn-icon h-100\">{{ category.name }}</a>
  159.                     </div>
  160.                 {% endfor %}
  161.                 </div><!--/ .row -->
  162.             </div>
  163.         </div><!--/ .row -->
  164.     </div><!--/ .container-fluid -->
  165. </section>
  166. {% endblock %}
  167. ", "products-cat.html.twig", "/data/sites/web/devliegerfilipbe/subsites/dev.devliegerfilip.dspdev.be/templates/products-cat.html.twig");
  168.     }
  169.     
  170.     public function checkSecurity()
  171.     {
  172.         static $tags = array("include" => 5, "for" => 22);
  173.         static $filters = array("escape" => 11, "trans" => 11);
  174.         static $functions = array("app_category_filter_generate_link" => 38);
  175.         try {
  176.             $this->sandbox->checkSecurity(
  177.                 ['include', 'for'],
  178.                 ['escape', 'trans'],
  179.                 ['app_category_filter_generate_link']
  180.             );
  181.         } catch (SecurityError $e) {
  182.             $e->setSourceContext($this->source);
  183.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  184.                 $e->setTemplateLine($tags[$e->getTagName()]);
  185.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  186.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  187.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  188.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  189.             }
  190.             throw $e;
  191.         }
  192.     }
  193. }