var/cache/dev/twig/55/552cacd0fdee4c8a962e209696710e26.php line 35

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