var/cache/dev/twig/b8/b818e3eb4a43fae7c2d6691ea3696cfd.php line 104

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. /* @MonsieurBizSyliusSearchPlugin/Search/_filters.html.twig */
  14. class __TwigTemplate_5ccc37726415b3279e3994c6e4c6eefc extends \Twig\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""@MonsieurBizSyliusSearchPlugin/Search/_filters.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""@MonsieurBizSyliusSearchPlugin/Search/_filters.html.twig"));
  33.         // line 1
  34.         $context["route_page"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'1$this->source); })()), "request", [], "any"falsefalsefalse1), "attributes", [], "any"falsefalsefalse1), "get", [=> "_route"], "method"falsefalsefalse1);
  35.         // line 2
  36.         echo "
  37.     ";
  38.         // line 3
  39.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["result"]) || array_key_exists("result"$context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.'3$this->source); })()), "filters", [], "any"falsefalsefalse3)) == 0)) {
  40.             // line 4
  41.             echo "        <div class=\"item hide-taxon-page\">
  42.             ";
  43.             // line 5
  44.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("monsieurbiz_searchplugin.filters.no_filter"), "html"nulltrue);
  45.             echo "
  46.         </div>
  47.     ";
  48.         } else {
  49.             // line 8
  50.             echo "        ";
  51.             $context["path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'8$this->source); })()), "request", [], "any"falsefalsefalse8), "attributes", [], "any"falsefalsefalse8), "get", [=> "_route"], "method"falsefalsefalse8), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'8$this->source); })()), "request", [], "any"falsefalsefalse8), "attributes", [], "any"falsefalsefalse8), "get", [=> "_route_params"], "method"falsefalsefalse8));
  52.             // line 9
  53.             echo "        <form name=\"filters-form\" method=\"get\" action=\"";
  54.             echo twig_escape_filter($this->env, (isset($context["path"]) || array_key_exists("path"$context) ? $context["path"] : (function () { throw new RuntimeError('Variable "path" does not exist.'9$this->source); })()), "html"nulltrue);
  55.             echo "\">
  56.             ";
  57.             // line 10
  58.             $context['_parent'] = $context;
  59.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["result"]) || array_key_exists("result"$context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.'10$this->source); })()), "filters", [], "any"falsefalsefalse10));
  60.             $context['loop'] = [
  61.               'parent' => $context['_parent'],
  62.               'index0' => 0,
  63.               'index'  => 1,
  64.               'first'  => true,
  65.             ];
  66.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  67.                 $length count($context['_seq']);
  68.                 $context['loop']['revindex0'] = $length 1;
  69.                 $context['loop']['revindex'] = $length;
  70.                 $context['loop']['length'] = $length;
  71.                 $context['loop']['last'] = === $length;
  72.             }
  73.             foreach ($context['_seq'] as $context["_key"] => $context["filter"]) {
  74.                 // line 11
  75.                 echo "                ";
  76.                 $this->loadTemplate("@MonsieurBizSyliusSearchPlugin/Search/_filter.html.twig""@MonsieurBizSyliusSearchPlugin/Search/_filters.html.twig"11)->display(twig_array_merge($context, ["filter" => $context["filter"]]));
  77.                 // line 12
  78.                 echo "            ";
  79.                 ++$context['loop']['index0'];
  80.                 ++$context['loop']['index'];
  81.                 $context['loop']['first'] = false;
  82.                 if (isset($context['loop']['length'])) {
  83.                     --$context['loop']['revindex0'];
  84.                     --$context['loop']['revindex'];
  85.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  86.                 }
  87.             }
  88.             $_parent $context['_parent'];
  89.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['filter'], $context['_parent'], $context['loop']);
  90.             $context array_intersect_key($context$_parent) + $_parent;
  91.             // line 13
  92.             echo "            ";
  93.             // line 14
  94.             echo "            ";
  95.             $context["sorting"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse14), "query", [], "any"falsefalsefalse14), "get", [=> "sorting"], "method"falsefalsefalse14);
  96.             // line 15
  97.             echo "            ";
  98.             if ( !twig_test_empty((isset($context["sorting"]) || array_key_exists("sorting"$context) ? $context["sorting"] : (function () { throw new RuntimeError('Variable "sorting" does not exist.'15$this->source); })()))) {
  99.                 // line 16
  100.                 echo "                ";
  101.                 $context['_parent'] = $context;
  102.                 $context['_seq'] = twig_ensure_traversable((isset($context["sorting"]) || array_key_exists("sorting"$context) ? $context["sorting"] : (function () { throw new RuntimeError('Variable "sorting" does not exist.'16$this->source); })()));
  103.                 foreach ($context['_seq'] as $context["sort"] => $context["order"]) {
  104.                     // line 17
  105.                     echo "                    <input type=\"hidden\" name=\"sorting[";
  106.                     echo twig_escape_filter($this->env$context["sort"], "html"nulltrue);
  107.                     echo "]\" value=\"";
  108.                     echo twig_escape_filter($this->env$context["order"], "html"nulltrue);
  109.                     echo "\" />
  110.                 ";
  111.                 }
  112.                 $_parent $context['_parent'];
  113.                 unset($context['_seq'], $context['_iterated'], $context['sort'], $context['order'], $context['_parent'], $context['loop']);
  114.                 $context array_intersect_key($context$_parent) + $_parent;
  115.                 // line 19
  116.                 echo "            ";
  117.             }
  118.             // line 20
  119.             echo "
  120.             ";
  121.             // line 22
  122.             echo "            ";
  123.             $context["limit"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'22$this->source); })()), "request", [], "any"falsefalsefalse22), "query", [], "any"falsefalsefalse22), "get", [=> "limit"], "method"falsefalsefalse22);
  124.             // line 23
  125.             echo "            ";
  126.             if ( !twig_test_empty((isset($context["limit"]) || array_key_exists("limit"$context) ? $context["limit"] : (function () { throw new RuntimeError('Variable "limit" does not exist.'23$this->source); })()))) {
  127.                 // line 24
  128.                 echo "                <input type=\"hidden\" name=\"limit\" value=\"";
  129.                 echo twig_escape_filter($this->env, (isset($context["limit"]) || array_key_exists("limit"$context) ? $context["limit"] : (function () { throw new RuntimeError('Variable "limit" does not exist.'24$this->source); })()), "html"nulltrue);
  130.                 echo "\" />
  131.             ";
  132.             }
  133.             // line 26
  134.             echo "
  135.             <div class=\"item hide-taxon-page ml-2 pt-md-0 pt-3\">
  136.                 <button type=\"\" class=\"btn-link py-1 bg-grey-dark\">
  137.                     <i class=\"search icon\"></i> ";
  138.             // line 29
  139.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("monsieurbiz_searchplugin.filters.apply_filters"), "html"nulltrue);
  140.             echo "
  141.                 </button>
  142.             </div>
  143.         </form>
  144.     ";
  145.         }
  146.         // line 35
  147.         echo "
  148. ";
  149.         
  150.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  151.         
  152.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  153.     }
  154.     public function getTemplateName()
  155.     {
  156.         return "@MonsieurBizSyliusSearchPlugin/Search/_filters.html.twig";
  157.     }
  158.     public function isTraitable()
  159.     {
  160.         return false;
  161.     }
  162.     public function getDebugInfo()
  163.     {
  164.         return array (  157 => 35,  148 => 29,  143 => 26,  137 => 24,  134 => 23,  131 => 22,  128 => 20,  125 => 19,  114 => 17,  109 => 16,  106 => 15,  103 => 14,  101 => 13,  87 => 12,  84 => 11,  67 => 10,  62 => 9,  59 => 8,  53 => 5,  50 => 4,  48 => 3,  45 => 2,  43 => 1,);
  165.     }
  166.     public function getSourceContext()
  167.     {
  168.         return new Source("{% set route_page = app.request.attributes.get('_route') %}
  169.     {% if result.filters|length == 0 %}
  170.         <div class=\"item hide-taxon-page\">
  171.             {{ 'monsieurbiz_searchplugin.filters.no_filter'|trans }}
  172.         </div>
  173.     {% else %}
  174.         {% set path = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
  175.         <form name=\"filters-form\" method=\"get\" action=\"{{ path }}\">
  176.             {% for filter in result.filters %}
  177.                 {% include '@MonsieurBizSyliusSearchPlugin/Search/_filter.html.twig' with {'filter': filter} %}
  178.             {% endfor %}
  179.             {# Don't loose current sorting #}
  180.             {% set sorting = app.request.query.get('sorting') %}
  181.             {% if sorting is not empty %}
  182.                 {% for sort, order in sorting %}
  183.                     <input type=\"hidden\" name=\"sorting[{{ sort }}]\" value=\"{{ order }}\" />
  184.                 {% endfor %}
  185.             {% endif %}
  186.             {# Don't loose current limit #}
  187.             {% set limit = app.request.query.get('limit') %}
  188.             {% if limit is not empty %}
  189.                 <input type=\"hidden\" name=\"limit\" value=\"{{ limit }}\" />
  190.             {% endif %}
  191.             <div class=\"item hide-taxon-page ml-2 pt-md-0 pt-3\">
  192.                 <button type=\"\" class=\"btn-link py-1 bg-grey-dark\">
  193.                     <i class=\"search icon\"></i> {{ 'monsieurbiz_searchplugin.filters.apply_filters' | trans }}
  194.                 </button>
  195.             </div>
  196.         </form>
  197.     {% endif %}
  198. ""@MonsieurBizSyliusSearchPlugin/Search/_filters.html.twig""/var/www/html/themes/BootstrapTheme/templates/bundles/MonsieurBizSyliusSearchPlugin/Search/_filters.html.twig");
  199.     }
  200. }