var/cache/dev/twig/c4/c4b9329eb1fd984c03ee90aeb9c9f64b.php line 100

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. /* product/listing_content.html.twig */
  14. class __TwigTemplate_fcd8f6310eb485e1a4fa163c31382d10 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.     }
  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""product/listing_content.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""product/listing_content.html.twig"));
  33.         // line 6
  34.         echo "
  35. ";
  36.         // line 8
  37.         if ((isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'8$this->source); })())) {
  38.             // line 9
  39.             echo "    <div class=\"page-header\">
  40.         <h1>";
  41.             // line 10
  42.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse10), "html"nulltrue);
  43.             echo "</h1>
  44.     </div>
  45. ";
  46.         }
  47.         // line 13
  48.         echo "
  49. <div class=\"album bg-light\">
  50.     <div class=\"container\">
  51.         <div class=\"row\">
  52.             <div class=\"col-md-3\">
  53.                 ";
  54.         // line 21
  55.         if (twig_get_attribute($this->env$this->sourcePimcore\Tool\DeviceDetector::getInstance(), "isPhone", [], "any"falsefalsefalse21)) {
  56.             // line 22
  57.             echo "                <div id=\"filter-container\" class=\"card mb-4\">
  58.                     <div class=\"card-header\">
  59.                         <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\">
  60.                             ";
  61.             // line 25
  62.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("filter.title"), "html"nulltrue);
  63.             echo "
  64.                         </a>
  65.                     </div>
  66.                     <div id=\"filter-container-content\" class=\"card-body collapse\" aria-labelledby=\"filter-head\" data-parent=\"#filter-container\">
  67.                         ";
  68.         }
  69.         // line 30
  70.         echo "
  71.                         <form id=\"js_filterfield\">
  72.                             ";
  73.         // line 33
  74.         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.'33$this->source); })()), "filters", [], "any"falsefalsefalse33)) > 0)) {
  75.             // line 34
  76.             echo "
  77.                                 ";
  78.             // line 35
  79.             $context['_parent'] = $context;
  80.             $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"falsefalsefalse35));
  81.             foreach ($context['_seq'] as $context["_key"] => $context["filter"]) {
  82.                 // line 36
  83.                 echo "
  84.                                     ";
  85.                 // line 37
  86.                 $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", [=> $context["filter"], => (isset($context["productListing"]) || array_key_exists("productListing"$context) ? $context["productListing"] : (function () { throw new RuntimeError('Variable "productListing" does not exist.'37$this->source); })()), => (isset($context["currentFilter"]) || array_key_exists("currentFilter"$context) ? $context["currentFilter"] : (function () { throw new RuntimeError('Variable "currentFilter" does not exist.'37$this->source); })())], "method"falsefalsefalse37);
  87.                 // line 38
  88.                 echo "
  89.                                     ";
  90.                 // line 39
  91.                 echo (isset($context["filterMarkup"]) || array_key_exists("filterMarkup"$context) ? $context["filterMarkup"] : (function () { throw new RuntimeError('Variable "filterMarkup" does not exist.'39$this->source); })());
  92.                 echo "
  93.                                 ";
  94.             }
  95.             $_parent $context['_parent'];
  96.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['filter'], $context['_parent'], $context['loop']);
  97.             $context array_intersect_key($context$_parent) + $_parent;
  98.             // line 42
  99.             echo "                            ";
  100.         }
  101.         // line 43
  102.         echo "
  103.                         </form>
  104.                         ";
  105.         // line 46
  106.         if (twig_get_attribute($this->env$this->sourcePimcore\Tool\DeviceDetector::getInstance(), "isPhone", [], "any"falsefalsefalse46)) {
  107.             // line 47
  108.             echo "                    </div></div>
  109.                 ";
  110.         }
  111.         // line 49
  112.         echo "
  113.             </div>
  114.             <div class=\"col-md-9\">
  115.                 <div class=\"row\">
  116.                     ";
  117.         // line 56
  118.         $context['_parent'] = $context;
  119.         $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); })()));
  120.         $context['loop'] = [
  121.           'parent' => $context['_parent'],
  122.           'index0' => 0,
  123.           'index'  => 1,
  124.           'first'  => true,
  125.         ];
  126.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  127.             $length count($context['_seq']);
  128.             $context['loop']['revindex0'] = $length 1;
  129.             $context['loop']['revindex'] = $length;
  130.             $context['loop']['length'] = $length;
  131.             $context['loop']['last'] = === $length;
  132.         }
  133.         foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  134.             // line 57
  135.             echo "                        <div class=\"col-md-4 d-flex align-items-stretch flex-column\">
  136.                             ";
  137.             // line 58
  138.             $this->loadTemplate("product/product_teaser.html.twig""product/listing_content.html.twig"58)->display(twig_array_merge($context, ["product" => $context["item"]]));
  139.             // line 59
  140.             echo "                        </div>
  141.                     ";
  142.             ++$context['loop']['index0'];
  143.             ++$context['loop']['index'];
  144.             $context['loop']['first'] = false;
  145.             if (isset($context['loop']['length'])) {
  146.                 --$context['loop']['revindex0'];
  147.                 --$context['loop']['revindex'];
  148.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  149.             }
  150.         }
  151.         $_parent $context['_parent'];
  152.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  153.         $context array_intersect_key($context$_parent) + $_parent;
  154.         // line 62
  155.         echo "                </div>
  156.             </div>
  157.         </div>
  158.         <div class=\"pt-5\">
  159.             ";
  160.         // line 70
  161.         $this->loadTemplate("includes/pagination.html.twig""product/listing_content.html.twig"70)->display($context);
  162.         // line 71
  163.         echo "
  164.         </div>
  165.     </div>
  166. </div>
  167. ";
  168.         // line 77
  169.         twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_inline_script')->getCallable()(), "appendScript", [=> "
  170.     \$('#js_filterfield .custom-checkbox input, #js_filterfield .custom-radio input').on('change', function() {
  171.         \$('#js_filterfield').submit();
  172.     });
  173. "], "method"falsefalsefalse77);
  174.         
  175.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  176.         
  177.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  178.     }
  179.     public function getTemplateName()
  180.     {
  181.         return "product/listing_content.html.twig";
  182.     }
  183.     public function isTraitable()
  184.     {
  185.         return false;
  186.     }
  187.     public function getDebugInfo()
  188.     {
  189.         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,);
  190.     }
  191.     public function getSourceContext()
  192.     {
  193.         return new Source("{# @var productListing \\Pimcore\\Bundle\\EcommerceFrameworkBundle\\IndexService\\ProductList\\ProductListInterface #}
  194. {# @var result Knp\\Component\\Pager\\Pagination\\SlidingPagination #}
  195. {# @var item \\App\\Model\\Product\\Car #}
  196. {# @var filterService \\Pimcore\\Bundle\\EcommerceFrameworkBundle\\FilterService\\FilterService #}
  197. {# @var filterDefinition \\Pimcore\\Model\\DataObject\\FilterDefinition #}
  198. {% if(category) %}
  199.     <div class=\"page-header\">
  200.         <h1>{{ category.name }}</h1>
  201.     </div>
  202. {% endif %}
  203. <div class=\"album bg-light\">
  204.     <div class=\"container\">
  205.         <div class=\"row\">
  206.             <div class=\"col-md-3\">
  207.                 {% if( pimcore_device().isPhone ) %}
  208.                 <div id=\"filter-container\" class=\"card mb-4\">
  209.                     <div class=\"card-header\">
  210.                         <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\">
  211.                             {{ 'filter.title' | trans }}
  212.                         </a>
  213.                     </div>
  214.                     <div id=\"filter-container-content\" class=\"card-body collapse\" aria-labelledby=\"filter-head\" data-parent=\"#filter-container\">
  215.                         {% endif %}
  216.                         <form id=\"js_filterfield\">
  217.                             {% if(filterDefinition.filters|length > 0) %}
  218.                                 {% for filter in filterDefinition.filters %}
  219.                                     {% set filterMarkup = filterService.filterFrontend(filter, productListing, currentFilter) %}
  220.                                     {{ filterMarkup | raw  }}
  221.                                 {% endfor %}
  222.                             {% endif %}
  223.                         </form>
  224.                         {% if( pimcore_device().isPhone ) %}
  225.                     </div></div>
  226.                 {% endif %}
  227.             </div>
  228.             <div class=\"col-md-9\">
  229.                 <div class=\"row\">
  230.                     {%  for item in results %}
  231.                         <div class=\"col-md-4 d-flex align-items-stretch flex-column\">
  232.                             {% include 'product/product_teaser.html.twig' with {'product': item} %}
  233.                         </div>
  234.                     {% endfor %}
  235.                 </div>
  236.             </div>
  237.         </div>
  238.         <div class=\"pt-5\">
  239.             {% include 'includes/pagination.html.twig' %}
  240.         </div>
  241.     </div>
  242. </div>
  243. {% do pimcore_inline_script().appendScript(\"
  244.     \$('#js_filterfield .custom-checkbox input, #js_filterfield .custom-radio input').on('change', function() {
  245.         \$('#js_filterfield').submit();
  246.     });
  247. \") %}""product/listing_content.html.twig""/www/htdocs/w0189996/pimcore-demo/templates/product/listing_content.html.twig");
  248.     }
  249. }