<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Shop/filter.html.twig */
class __TwigTemplate_a85966665595cb815891510924fa8c3a extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Shop/filter.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Shop/filter.html.twig"));
// line 5
echo "
";
// line 10
echo "
\t<div class=\"\" style=\"width: 80%;margin-right: auto;margin-left: auto\">
<div class=\"row\">
<div class=\"col-12 col-lg-3\">
";
// line 15
echo " <form class=\"mb-5\" id=\"js_filterfield_pim\">
";
// line 16
if (array_key_exists("filterDefinition", $context)) {
// line 17
echo " ";
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.', 17, $this->source); })()), "filters", [], "any", false, false, true, 17)) > 0)) {
// line 18
echo " ";
$context['_parent'] = $context;
$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", false, false, true, 18));
foreach ($context['_seq'] as $context["_key"] => $context["filter"]) {
// line 19
echo " ";
$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", false, false, true, 19);
// line 20
echo " ";
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);
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['filter'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
echo " ";
}
// line 23
echo " ";
}
// line 24
echo "
";
// line 26
echo "
</form>
</div>
\t\t<div class=\"col-12 col-lg-9\">
\t\t\t\t<div id=\"grid-productos\" class=\"grid-products grid--view-items prd-grid pt-4\"> <div
\t\t\t\t\tclass=\"row\">
\t\t\t\t\t";
// line 33
echo "\t\t\t\t\t";
if (array_key_exists("filterDefinition", $context)) {
// line 34
echo "\t\t\t\t\t\t";
$context['_parent'] = $context;
$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); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 35
echo "\t\t\t\t\t\t\t";
$this->loadTemplate("Shop/product_teaser.html.twig", "Shop/filter.html.twig", 35)->display(twig_array_merge($context, ["product" => $context["item"]]));
// line 36
echo "\t\t\t\t\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 37
echo "\t\t\t\t\t\t";
// line 38
echo "\t\t\t\t\t";
}
// line 39
echo "\t\t\t\t</div>
\t\t\t</div>
\t\t\t";
// line 43
echo "\t\t\t";
if (array_key_exists("filterDefinition", $context)) {
// line 44
echo "\t\t\t\t<div class=\"pt-5\">
\t\t\t\t\t";
// line 45
$this->loadTemplate("Shop/includes/newPagination.html.twig", "Shop/filter.html.twig", 45)->display($context);
// line 46
echo "\t\t\t\t</div>
\t\t\t";
}
// line 48
echo "
\t\t\t";
// line 50
echo "\t\t</div>
\t</div>
</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Shop/filter.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{# @var products \\Pimcore\\Bundle\\EcommerceFrameworkBundle\\IndexService\\ProductList\\ProductListInterface #}
{# @var filterService \\Pimcore\\Bundle\\EcommerceFrameworkBundle\\FilterService\\FilterService #}
{# @var filterDefinition \\Pimcore\\Model\\DataObject\\FilterDefinition #}
{# @var item \\App\\Model\\DefaultProduct #}
{# {% if(category) %}#}
{#\t\t<div class=\"page-header\"> <h1>{{ category.title }}</h1>#}
{#\t</div>#}
{#{% endif %}#}
\t<div class=\"\" style=\"width: 80%;margin-right: auto;margin-left: auto\">
<div class=\"row\">
<div class=\"col-12 col-lg-3\">
{# Filters start #}
<form class=\"mb-5\" id=\"js_filterfield_pim\">
{% if filterDefinition is defined %}
{% if(filterDefinition.filters|length > 0) %}
{% for filter in filterDefinition.filters %}
{% set filterMarkup = filterService.filterFrontend(filter, products, currentFilter) %}
{{ filterMarkup | raw }}
{% endfor %}
{% endif %}
{% endif %}
{# Filters end #}
</form>
</div>
\t\t<div class=\"col-12 col-lg-9\">
\t\t\t\t<div id=\"grid-productos\" class=\"grid-products grid--view-items prd-grid pt-4\"> <div
\t\t\t\t\tclass=\"row\">
\t\t\t\t\t{# Products start #}
\t\t\t\t\t{% if filterDefinition is defined %}
\t\t\t\t\t\t{% for item in paginator %}
\t\t\t\t\t\t\t{% include 'Shop/product_teaser.html.twig' with {'product': item} %}
\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t{# Products end #}
\t\t\t\t\t{% endif %}
\t\t\t\t</div>
\t\t\t</div>
\t\t\t{# Pagination start #}
\t\t\t{% if filterDefinition is defined %}
\t\t\t\t<div class=\"pt-5\">
\t\t\t\t\t{% include 'Shop/includes/newPagination.html.twig' %}
\t\t\t\t</div>
\t\t\t{% endif %}
\t\t\t{# Pagination end #}
\t\t</div>
\t</div>
</div>
", "Shop/filter.html.twig", "/var/www/html/templates/Shop/filter.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 16, "for" => 18, "set" => 19, "include" => 35);
static $filters = array("length" => 17, "raw" => 20);
static $functions = array();
try {
$this->sandbox->checkSecurity(
['if', 'for', 'set', 'include'],
['length', 'raw'],
[]
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}