var/cache/dev/twig/c8/c8af980a187de631f6740a13ef8ae9b5.php line 59

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. /* includes/product-categories.html.twig */
  14. class __TwigTemplate_334f910d48f3e1d70e619d29fbe03a19 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", "includes/product-categories.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", "includes/product-categories.html.twig"));
  35.         // line 1
  36.         echo "<aside class=\"sidebar\">
  37.     <form id=\"js_filterfield\">
  38.     ";
  39.         // line 3
  40.         if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["filterDefinition"]) || array_key_exists("filterDefinition", $context) ? $context["filterDefinition"] : (function () { throw new RuntimeError('Variable "filterDefinition" does not exist.', 3, $this->source); })()), "filters", [], "any", false, false, true, 3)) > 0)) {
  41.             // line 4
  42.             echo "        ";
  43.             $context['_parent'] = $context;
  44.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["filterDefinition"]) || array_key_exists("filterDefinition", $context) ? $context["filterDefinition"] : (function () { throw new RuntimeError('Variable "filterDefinition" does not exist.', 4, $this->source); })()), "filters", [], "any", false, false, true, 4));
  45.             foreach ($context['_seq'] as $context["_key"] => $context["filter"]) {
  46.                 // line 5
  47.                 echo "                                
  48.             ";
  49.                 // line 6
  50.                 $context["filterMarkup"] = twig_get_attribute($this->env, $this->source, (isset($context["filterService"]) || array_key_exists("filterService", $context) ? $context["filterService"] : (function () { throw new RuntimeError('Variable "filterService" does not exist.', 6, $this->source); })()), "filterFrontend", [$context["filter"], (isset($context["productListing"]) || array_key_exists("productListing", $context) ? $context["productListing"] : (function () { throw new RuntimeError('Variable "productListing" does not exist.', 6, $this->source); })()), (isset($context["currentFilter"]) || array_key_exists("currentFilter", $context) ? $context["currentFilter"] : (function () { throw new RuntimeError('Variable "currentFilter" does not exist.', 6, $this->source); })())], "method", false, false, true, 6);
  51.                 // line 7
  52.                 echo "
  53.             ";
  54.                 // line 8
  55.                 echo $this->sandbox->ensureToStringAllowed((isset($context["filterMarkup"]) || array_key_exists("filterMarkup", $context) ? $context["filterMarkup"] : (function () { throw new RuntimeError('Variable "filterMarkup" does not exist.', 8, $this->source); })()), 8, $this->source);
  56.                 echo "
  57.         ";
  58.             }
  59.             $_parent = $context['_parent'];
  60.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['filter'], $context['_parent'], $context['loop']);
  61.             $context = array_intersect_key($context, $_parent) + $_parent;
  62.             // line 11
  63.             echo "    ";
  64.         }
  65.         // line 12
  66.         echo "
  67.     ";
  68.         // line 14
  69.         echo "    ";
  70.         $context['_parent'] = $context;
  71.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 14, $this->source); })()), "request", [], "any", false, false, true, 14), "query", [], "any", false, false, true, 14));
  72.         foreach ($context['_seq'] as $context["key"] => $context["value"]) {
  73.             // line 15
  74.             echo "        ";
  75.             if (((($context["key"] != "parentCategoryIds") && ($context["key"] != "page")) && ($context["key"] != "categoryTypes"))) {
  76.                 // line 16
  77.                 echo "            ";
  78.                 if (twig_test_iterable($context["value"])) {
  79.                     // line 17
  80.                     echo "                ";
  81.                     $context['_parent'] = $context;
  82.                     $context['_seq'] = twig_ensure_traversable($context["value"]);
  83.                     foreach ($context['_seq'] as $context["subkey"] => $context["subvalue"]) {
  84.                         // line 18
  85.                         echo "                    <input type=\"hidden\" name=\"";
  86.                         echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["key"], 18, $this->source), "html", null, true);
  87.                         echo "[]\" value=\"";
  88.                         echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["subvalue"], 18, $this->source), "html", null, true);
  89.                         echo "\">
  90.                 ";
  91.                     }
  92.                     $_parent = $context['_parent'];
  93.                     unset($context['_seq'], $context['_iterated'], $context['subkey'], $context['subvalue'], $context['_parent'], $context['loop']);
  94.                     $context = array_intersect_key($context, $_parent) + $_parent;
  95.                     // line 20
  96.                     echo "            ";
  97.                 } else {
  98.                     // line 21
  99.                     echo "                <input type=\"hidden\" name=\"";
  100.                     echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["key"], 21, $this->source), "html", null, true);
  101.                     echo "\" value=\"";
  102.                     echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["value"], 21, $this->source), "html", null, true);
  103.                     echo "\">
  104.             ";
  105.                 }
  106.                 // line 23
  107.                 echo "        ";
  108.             }
  109.             // line 24
  110.             echo "    ";
  111.         }
  112.         $_parent = $context['_parent'];
  113.         unset($context['_seq'], $context['_iterated'], $context['key'], $context['value'], $context['_parent'], $context['loop']);
  114.         $context = array_intersect_key($context, $_parent) + $_parent;
  115.         // line 25
  116.         echo "    </form>
  117. </aside>";
  118.         
  119.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  120.         
  121.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  122.     }
  123.     public function getTemplateName()
  124.     {
  125.         return "includes/product-categories.html.twig";
  126.     }
  127.     public function isTraitable()
  128.     {
  129.         return false;
  130.     }
  131.     public function getDebugInfo()
  132.     {
  133.         return array (  126 => 25,  120 => 24,  117 => 23,  109 => 21,  106 => 20,  95 => 18,  90 => 17,  87 => 16,  84 => 15,  79 => 14,  76 => 12,  73 => 11,  64 => 8,  61 => 7,  59 => 6,  56 => 5,  51 => 4,  49 => 3,  45 => 1,);
  134.     }
  135.     public function getSourceContext()
  136.     {
  137.         return new Source("<aside class=\"sidebar\">
  138.     <form id=\"js_filterfield\">
  139.     {% if(filterDefinition.filters|length > 0) %}
  140.         {% for filter in filterDefinition.filters %}
  141.                                 
  142.             {% set filterMarkup = filterService.filterFrontend(filter, productListing, currentFilter) %}
  143.             {{ filterMarkup | raw  }}
  144.         {% endfor %}
  145.     {% endif %}
  146.     {# Remember other query params #}
  147.     {% for key,value in app.request.query %}
  148.         {% if key != 'parentCategoryIds' and key != 'page' and key != 'categoryTypes' %}
  149.             {% if value is iterable %}
  150.                 {% for subkey,subvalue in value %}
  151.                     <input type=\"hidden\" name=\"{{ key }}[]\" value=\"{{ subvalue }}\">
  152.                 {% endfor %}
  153.             {% else %}
  154.                 <input type=\"hidden\" name=\"{{ key }}\" value=\"{{ value }}\">
  155.             {% endif %}
  156.         {% endif %}
  157.     {% endfor %}
  158.     </form>
  159. </aside>", "includes/product-categories.html.twig", "/data/sites/web/devliegerfilipbe/subsites/dev.devliegerfilip.dspdev.be/templates/includes/product-categories.html.twig");
  160.     }
  161.     
  162.     public function checkSecurity()
  163.     {
  164.         static $tags = array("if" => 3, "for" => 4, "set" => 6);
  165.         static $filters = array("length" => 3, "raw" => 8, "escape" => 18);
  166.         static $functions = array();
  167.         try {
  168.             $this->sandbox->checkSecurity(
  169.                 ['if', 'for', 'set'],
  170.                 ['length', 'raw', 'escape'],
  171.                 []
  172.             );
  173.         } catch (SecurityError $e) {
  174.             $e->setSourceContext($this->source);
  175.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  176.                 $e->setTemplateLine($tags[$e->getTagName()]);
  177.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  178.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  179.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  180.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  181.             }
  182.             throw $e;
  183.         }
  184.     }
  185. }