var/cache/dev/twig/58/58cc973e9dbd73f87c50a638c7449f81.php line 118

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. /* Shop/filter.html.twig */
  14. class __TwigTemplate_a85966665595cb815891510924fa8c3a 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""Shop/filter.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""Shop/filter.html.twig"));
  35.         // line 5
  36.         echo "
  37. ";
  38.         // line 10
  39.         echo "
  40. \t<div class=\"\" style=\"width: 80%;margin-right: auto;margin-left: auto\">
  41.         <div class=\"row\">
  42.             <div class=\"col-12 col-lg-3\">
  43.                 ";
  44.         // line 15
  45.         echo "                <form class=\"mb-5\" id=\"js_filterfield_pim\">
  46.                     ";
  47.         // line 16
  48.         if (array_key_exists("filterDefinition"$context)) {
  49.             // line 17
  50.             echo "                        ";
  51.             if ((twig_length_filter($this->envtwig_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.'17$this->source); })()), "filters", [], "any"falsefalsetrue17)) > 0)) {
  52.                 // line 18
  53.                 echo "                            ";
  54.                 $context['_parent'] = $context;
  55.                 $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.'18$this->source); })()), "filters", [], "any"falsefalsetrue18));
  56.                 foreach ($context['_seq'] as $context["_key"] => $context["filter"]) {
  57.                     // line 19
  58.                     echo "                                ";
  59.                     $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.'19$this->source); })()), "filterFrontend", [$context["filter"], (isset($context["products"]) || array_key_exists("products"$context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.'19$this->source); })()), (isset($context["currentFilter"]) || array_key_exists("currentFilter"$context) ? $context["currentFilter"] : (function () { throw new RuntimeError('Variable "currentFilter" does not exist.'19$this->source); })())], "method"falsefalsetrue19);
  60.                     // line 20
  61.                     echo "                                ";
  62.                     echo $this->sandbox->ensureToStringAllowed((isset($context["filterMarkup"]) || array_key_exists("filterMarkup"$context) ? $context["filterMarkup"] : (function () { throw new RuntimeError('Variable "filterMarkup" does not exist.'20$this->source); })()), 20$this->source);
  63.                     echo "
  64.                             ";
  65.                 }
  66.                 $_parent $context['_parent'];
  67.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['filter'], $context['_parent'], $context['loop']);
  68.                 $context array_intersect_key($context$_parent) + $_parent;
  69.                 // line 22
  70.                 echo "                        ";
  71.             }
  72.             // line 23
  73.             echo "                    ";
  74.         }
  75.         // line 24
  76.         echo "
  77.                     ";
  78.         // line 26
  79.         echo "
  80.                 </form>
  81.             </div>
  82. \t\t<div class=\"col-12 col-lg-9\">
  83. \t\t\t\t<div id=\"grid-productos\" class=\"grid-products grid--view-items prd-grid pt-4\"> <div
  84. \t\t\t\t\tclass=\"row\">
  85. \t\t\t\t\t";
  86.         // line 33
  87.         echo "\t\t\t\t\t";
  88.         if (array_key_exists("filterDefinition"$context)) {
  89.             // line 34
  90.             echo "\t\t\t\t\t\t";
  91.             $context['_parent'] = $context;
  92.             $context['_seq'] = twig_ensure_traversable((isset($context["paginator"]) || array_key_exists("paginator"$context) ? $context["paginator"] : (function () { throw new RuntimeError('Variable "paginator" does not exist.'34$this->source); })()));
  93.             $context['loop'] = [
  94.               'parent' => $context['_parent'],
  95.               'index0' => 0,
  96.               'index'  => 1,
  97.               'first'  => true,
  98.             ];
  99.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  100.                 $length count($context['_seq']);
  101.                 $context['loop']['revindex0'] = $length 1;
  102.                 $context['loop']['revindex'] = $length;
  103.                 $context['loop']['length'] = $length;
  104.                 $context['loop']['last'] = === $length;
  105.             }
  106.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  107.                 // line 35
  108.                 echo "\t\t\t\t\t\t\t";
  109.                 $this->loadTemplate("Shop/product_teaser.html.twig""Shop/filter.html.twig"35)->display(twig_array_merge($context, ["product" => $context["item"]]));
  110.                 // line 36
  111.                 echo "\t\t\t\t\t\t";
  112.                 ++$context['loop']['index0'];
  113.                 ++$context['loop']['index'];
  114.                 $context['loop']['first'] = false;
  115.                 if (isset($context['loop']['length'])) {
  116.                     --$context['loop']['revindex0'];
  117.                     --$context['loop']['revindex'];
  118.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  119.                 }
  120.             }
  121.             $_parent $context['_parent'];
  122.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  123.             $context array_intersect_key($context$_parent) + $_parent;
  124.             // line 37
  125.             echo "\t\t\t\t\t\t";
  126.             // line 38
  127.             echo "\t\t\t\t\t";
  128.         }
  129.         // line 39
  130.         echo "\t\t\t\t</div>
  131. \t\t\t</div>
  132. \t\t\t";
  133.         // line 43
  134.         echo "\t\t\t";
  135.         if (array_key_exists("filterDefinition"$context)) {
  136.             // line 44
  137.             echo "\t\t\t\t<div class=\"pt-5\">
  138. \t\t\t\t\t";
  139.             // line 45
  140.             $this->loadTemplate("Shop/includes/newPagination.html.twig""Shop/filter.html.twig"45)->display($context);
  141.             // line 46
  142.             echo "\t\t\t\t</div>
  143. \t\t\t";
  144.         }
  145.         // line 48
  146.         echo "
  147. \t\t\t";
  148.         // line 50
  149.         echo "\t\t</div>
  150. \t</div>
  151. </div>
  152. ";
  153.         
  154.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  155.         
  156.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  157.     }
  158.     /**
  159.      * @codeCoverageIgnore
  160.      */
  161.     public function getTemplateName()
  162.     {
  163.         return "Shop/filter.html.twig";
  164.     }
  165.     /**
  166.      * @codeCoverageIgnore
  167.      */
  168.     public function isTraitable()
  169.     {
  170.         return false;
  171.     }
  172.     /**
  173.      * @codeCoverageIgnore
  174.      */
  175.     public function getDebugInfo()
  176.     {
  177.         return array (  159 => 50,  156 => 48,  152 => 46,  150 => 45,  147 => 44,  144 => 43,  139 => 39,  136 => 38,  134 => 37,  120 => 36,  117 => 35,  99 => 34,  96 => 33,  88 => 26,  85 => 24,  82 => 23,  79 => 22,  70 => 20,  67 => 19,  62 => 18,  59 => 17,  57 => 16,  54 => 15,  48 => 10,  45 => 5,);
  178.     }
  179.     public function getSourceContext()
  180.     {
  181.         return new Source("{# @var products \\Pimcore\\Bundle\\EcommerceFrameworkBundle\\IndexService\\ProductList\\ProductListInterface #}
  182. {# @var filterService \\Pimcore\\Bundle\\EcommerceFrameworkBundle\\FilterService\\FilterService #}
  183. {# @var filterDefinition \\Pimcore\\Model\\DataObject\\FilterDefinition #}
  184. {# @var item \\App\\Model\\DefaultProduct #}
  185. {# {% if(category) %}#}
  186. {#\t\t<div class=\"page-header\"> <h1>{{ category.title }}</h1>#}
  187. {#\t</div>#}
  188. {#{% endif %}#}
  189. \t<div class=\"\" style=\"width: 80%;margin-right: auto;margin-left: auto\">
  190.         <div class=\"row\">
  191.             <div class=\"col-12 col-lg-3\">
  192.                 {# Filters start #}
  193.                 <form class=\"mb-5\" id=\"js_filterfield_pim\">
  194.                     {% if filterDefinition is defined %}
  195.                         {% if(filterDefinition.filters|length > 0) %}
  196.                             {% for filter in filterDefinition.filters %}
  197.                                 {% set filterMarkup = filterService.filterFrontend(filter, products, currentFilter) %}
  198.                                 {{ filterMarkup | raw  }}
  199.                             {% endfor %}
  200.                         {% endif %}
  201.                     {% endif %}
  202.                     {# Filters end #}
  203.                 </form>
  204.             </div>
  205. \t\t<div class=\"col-12 col-lg-9\">
  206. \t\t\t\t<div id=\"grid-productos\" class=\"grid-products grid--view-items prd-grid pt-4\"> <div
  207. \t\t\t\t\tclass=\"row\">
  208. \t\t\t\t\t{# Products start #}
  209. \t\t\t\t\t{% if filterDefinition is defined %}
  210. \t\t\t\t\t\t{%  for item in paginator %}
  211. \t\t\t\t\t\t\t{% include 'Shop/product_teaser.html.twig' with {'product': item} %}
  212. \t\t\t\t\t\t{% endfor %}
  213. \t\t\t\t\t\t{# Products end #}
  214. \t\t\t\t\t{% endif %}
  215. \t\t\t\t</div>
  216. \t\t\t</div>
  217. \t\t\t{# Pagination start #}
  218. \t\t\t{% if filterDefinition is defined %}
  219. \t\t\t\t<div class=\"pt-5\">
  220. \t\t\t\t\t{% include 'Shop/includes/newPagination.html.twig' %}
  221. \t\t\t\t</div>
  222. \t\t\t{% endif %}
  223. \t\t\t{# Pagination end #}
  224. \t\t</div>
  225. \t</div>
  226. </div>
  227. ""Shop/filter.html.twig""/var/www/html/templates/Shop/filter.html.twig");
  228.     }
  229.     
  230.     public function checkSecurity()
  231.     {
  232.         static $tags = array("if" => 16"for" => 18"set" => 19"include" => 35);
  233.         static $filters = array("length" => 17"raw" => 20);
  234.         static $functions = array();
  235.         try {
  236.             $this->sandbox->checkSecurity(
  237.                 ['if''for''set''include'],
  238.                 ['length''raw'],
  239.                 []
  240.             );
  241.         } catch (SecurityError $e) {
  242.             $e->setSourceContext($this->source);
  243.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  244.                 $e->setTemplateLine($tags[$e->getTagName()]);
  245.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  246.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  247.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  248.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  249.             }
  250.             throw $e;
  251.         }
  252.     }
  253. }