<?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;
/* /product/listing_content.html.twig */
class __TwigTemplate_144953bedd1941270cdd83c614bab48816350edd1d079260d614ea8a8c072351 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "/product/listing_content.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "/product/listing_content.html.twig"));
// line 6
echo "
";
// line 8
if ((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 8, $this->source); })())) {
// line 9
echo " <div class=\"page-header\">
<h1>";
// line 10
echo twig_escape_filter($this->env, 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.', 10, $this->source); })()), "name", [], "any", false, false, false, 10), "html", null, true);
echo "</h1>
</div>
";
}
// line 13
echo "
<div class=\"album bg-light\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-md-3\">
";
// line 21
if (twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_device')->getCallable(), []), "isPhone", [], "any", false, false, false, 21)) {
// line 22
echo " <div id=\"filter-container\" class=\"card mb-4\">
<div class=\"card-header\">
<a id=\"filter-head\" href=\"#\" class=\"text-dark text-decoration-none\" data-toggle=\"collapse\" data-target=\"#filter-container-content\" aria-expanded=\"true\" aria-controls=\"filter-container-content\">
";
// line 25
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("filter.title"), "html", null, true);
echo "
</a>
</div>
<div id=\"filter-container-content\" class=\"card-body collapse\" aria-labelledby=\"filter-head\" data-parent=\"#filter-container\">
";
}
// line 30
echo "
<form id=\"js_filterfield\">
";
// line 33
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.', 33, $this->source); })()), "filters", [], "any", false, false, false, 33)) > 0)) {
// line 34
echo "
";
// line 35
$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.', 35, $this->source); })()), "filters", [], "any", false, false, false, 35));
foreach ($context['_seq'] as $context["_key"] => $context["filter"]) {
// line 36
echo "
";
// line 37
$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.', 37, $this->source); })()), "filterFrontend", [0 => $context["filter"], 1 => (isset($context["productListing"]) || array_key_exists("productListing", $context) ? $context["productListing"] : (function () { throw new RuntimeError('Variable "productListing" does not exist.', 37, $this->source); })()), 2 => (isset($context["currentFilter"]) || array_key_exists("currentFilter", $context) ? $context["currentFilter"] : (function () { throw new RuntimeError('Variable "currentFilter" does not exist.', 37, $this->source); })())], "method", false, false, false, 37);
// line 38
echo "
";
// line 39
echo (isset($context["filterMarkup"]) || array_key_exists("filterMarkup", $context) ? $context["filterMarkup"] : (function () { throw new RuntimeError('Variable "filterMarkup" does not exist.', 39, $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 42
echo " ";
}
// line 43
echo "
</form>
";
// line 46
if (twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_device')->getCallable(), []), "isPhone", [], "any", false, false, false, 46)) {
// line 47
echo " </div></div>
";
}
// line 49
echo "
</div>
<div class=\"col-md-9\">
<div class=\"row\">
";
// line 56
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 56, $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 57
echo " <div class=\"col-md-4 d-flex align-items-stretch flex-column\">
";
// line 58
$this->loadTemplate("product/product_teaser.html.twig", "/product/listing_content.html.twig", 58)->display(twig_array_merge($context, ["product" => $context["item"]]));
// line 59
echo " </div>
";
++$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 62
echo " </div>
</div>
</div>
<div class=\"pt-5\">
";
// line 70
$this->loadTemplate("includes/pagination.html.twig", "/product/listing_content.html.twig", 70)->display($context);
// line 71
echo "
</div>
</div>
</div>
";
// line 77
twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('pimcore_inline_script')->getCallable(), []), "appendScript", [0 => "
\$('#js_filterfield .custom-checkbox input, #js_filterfield .custom-radio input').on('change', function() {
\$('#js_filterfield').submit();
});
"], "method", false, false, false, 77);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "/product/listing_content.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 195 => 77, 187 => 71, 185 => 70, 175 => 62, 159 => 59, 157 => 58, 154 => 57, 137 => 56, 128 => 49, 124 => 47, 122 => 46, 117 => 43, 114 => 42, 105 => 39, 102 => 38, 100 => 37, 97 => 36, 93 => 35, 90 => 34, 88 => 33, 83 => 30, 75 => 25, 70 => 22, 68 => 21, 58 => 13, 52 => 10, 49 => 9, 47 => 8, 43 => 6,);
}
public function getSourceContext()
{
return new Source("{# @var productListing \\Pimcore\\Bundle\\EcommerceFrameworkBundle\\IndexService\\ProductList\\ProductListInterface #}
{# @var result \\Zend\\Paginator\\Paginator #}
{# @var item \\AppBundle\\Model\\Product\\Car #}
{# @var filterService \\Pimcore\\Bundle\\EcommerceFrameworkBundle\\FilterService\\FilterService #}
{# @var filterDefinition \\Pimcore\\Model\\DataObject\\FilterDefinition #}
{% if(category) %}
<div class=\"page-header\">
<h1>{{ category.name }}</h1>
</div>
{% endif %}
<div class=\"album bg-light\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-md-3\">
{% if( pimcore_device().isPhone ) %}
<div id=\"filter-container\" class=\"card mb-4\">
<div class=\"card-header\">
<a id=\"filter-head\" href=\"#\" class=\"text-dark text-decoration-none\" data-toggle=\"collapse\" data-target=\"#filter-container-content\" aria-expanded=\"true\" aria-controls=\"filter-container-content\">
{{ 'filter.title' | trans }}
</a>
</div>
<div id=\"filter-container-content\" class=\"card-body collapse\" aria-labelledby=\"filter-head\" data-parent=\"#filter-container\">
{% endif %}
<form id=\"js_filterfield\">
{% if(filterDefinition.filters|length > 0) %}
{% for filter in filterDefinition.filters %}
{% set filterMarkup = filterService.filterFrontend(filter, productListing, currentFilter) %}
{{ filterMarkup | raw }}
{% endfor %}
{% endif %}
</form>
{% if( pimcore_device().isPhone ) %}
</div></div>
{% endif %}
</div>
<div class=\"col-md-9\">
<div class=\"row\">
{% for item in results %}
<div class=\"col-md-4 d-flex align-items-stretch flex-column\">
{% include 'product/product_teaser.html.twig' with {'product': item} %}
</div>
{% endfor %}
</div>
</div>
</div>
<div class=\"pt-5\">
{% include 'includes/pagination.html.twig' %}
</div>
</div>
</div>
{% do pimcore_inline_script().appendScript(\"
\$('#js_filterfield .custom-checkbox input, #js_filterfield .custom-radio input').on('change', function() {
\$('#js_filterfield').submit();
});
\") %}", "/product/listing_content.html.twig", "/home/forge/pimcore-demo.code14.dev/app/Resources/views/product/listing_content.html.twig");
}
}