var/cache/dev/twig/84/84f6fe41d96bb23a723965da5ea753dd.php line 50

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. /* @SyliusShop/Product/Index/_main.html.twig */
  14. class __TwigTemplate_ff971eea82de113997d99b67398c6b8c extends \Twig\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""@SyliusShop/Product/Index/_main.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""@SyliusShop/Product/Index/_main.html.twig"));
  33.         // line 1
  34.         $macros["messages"] = $this->macros["messages"] = $this->loadTemplate("@SyliusUi/Macro/messages.html.twig""@SyliusShop/Product/Index/_main.html.twig"1)->unwrap();
  35.         // line 2
  36.         $macros["pagination"] = $this->macros["pagination"] = $this->loadTemplate("@SyliusUi/Macro/pagination.html.twig""@SyliusShop/Product/Index/_main.html.twig"2)->unwrap();
  37.         // line 3
  38.         echo "
  39. ";
  40.         // line 4
  41.         echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.index.search.without_input"$context);
  42.         echo "
  43. <div class=\"filtre-responsive-div\">
  44.    <div class=\"filtre-responsive\">
  45.        <svg width=\"18\" height=\"14\" viewBox=\"0 0 18 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
  46.            <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.354 3.74997H1C0.801088 3.74997 0.610322 3.67096 0.46967 3.5303C0.329018 3.38965 0.25 3.19889 0.25 2.99997C0.25 2.80106 0.329018 2.6103 0.46967 2.46964C0.610322 2.32899 0.801088 2.24997 1 2.24997H10.354C10.5174 1.67405 10.8643 1.16716 11.3419 0.806225C11.8195 0.445286 12.4018 0.25 13.0005 0.25C13.5992 0.25 14.1815 0.445286 14.6591 0.806225C15.1367 1.16716 15.4836 1.67405 15.647 2.24997H17C17.1989 2.24997 17.3897 2.32899 17.5303 2.46964C17.671 2.6103 17.75 2.80106 17.75 2.99997C17.75 3.19889 17.671 3.38965 17.5303 3.5303C17.3897 3.67096 17.1989 3.74997 17 3.74997H15.646C15.4826 4.3259 15.1357 4.83279 14.6581 5.19372C14.1805 5.55466 13.5982 5.74995 12.9995 5.74995C12.4008 5.74995 11.8185 5.55466 11.3409 5.19372C10.8633 4.83279 10.5164 4.3259 10.353 3.74997H10.354ZM11.75 2.99997C11.75 2.66845 11.8817 2.35051 12.1161 2.11609C12.3505 1.88167 12.6685 1.74997 13 1.74997C13.3315 1.74997 13.6495 1.88167 13.8839 2.11609C14.1183 2.35051 14.25 2.66845 14.25 2.99997C14.25 3.3315 14.1183 3.64944 13.8839 3.88386C13.6495 4.11828 13.3315 4.24997 13 4.24997C12.6685 4.24997 12.3505 4.11828 12.1161 3.88386C11.8817 3.64944 11.75 3.3315 11.75 2.99997ZM7.646 11.75H17C17.1989 11.75 17.3897 11.671 17.5303 11.5303C17.671 11.3897 17.75 11.1989 17.75 11C17.75 10.8011 17.671 10.6103 17.5303 10.4696C17.3897 10.329 17.1989 10.25 17 10.25H7.646C7.48227 9.67446 7.13536 9.16803 6.65787 8.80743C6.18038 8.44684 5.59835 8.25176 5 8.25176C4.40165 8.25176 3.81962 8.44684 3.34213 8.80743C2.86464 9.16803 2.51773 9.67446 2.354 10.25H1C0.801088 10.25 0.610322 10.329 0.46967 10.4696C0.329018 10.6103 0.25 10.8011 0.25 11C0.25 11.1989 0.329018 11.3897 0.46967 11.5303C0.610322 11.671 0.801088 11.75 1 11.75H2.354C2.51773 12.3255 2.86464 12.8319 3.34213 13.1925C3.81962 13.5531 4.40165 13.7482 5 13.7482C5.59835 13.7482 6.18038 13.5531 6.65787 13.1925C7.13536 12.8319 7.48227 12.3255 7.646 11.75ZM3.75 11C3.75 10.6685 3.8817 10.3505 4.11612 10.1161C4.35054 9.88167 4.66848 9.74998 5 9.74998C5.33152 9.74998 5.64946 9.88167 5.88388 10.1161C6.1183 10.3505 6.25 10.6685 6.25 11C6.25 11.3315 6.1183 11.6494 5.88388 11.8839C5.64946 12.1183 5.33152 12.25 5 12.25C4.66848 12.25 4.35054 12.1183 4.11612 11.8839C3.8817 11.6494 3.75 11.3315 3.75 11Z\" fill=\"black\"/>
  47.        </svg>
  48.        Filtres
  49.    </div>
  50. </div>
  51. <script>
  52.   var burgerIcon = document.querySelector('.filtre-responsive');
  53.   var CloseIcon = document.querySelector('#close-icon-filter');
  54.   var mobileMenu = document.querySelector('#filtre-container');
  55.   console.log(mobileMenu)
  56.   burgerIcon.addEventListener('click', function() {
  57.     mobileMenu.id = 'filtre-container-visible';
  58.   });
  59.   CloseIcon.addEventListener('click', function() {
  60.     mobileMenu.id = 'filtre-container';
  61.   });
  62. </script>
  63. <div class=\"ui clearing hidden divider\"></div>
  64. ";
  65.         // line 28
  66.         echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.index.before_list", ["products" => twig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'28$this->source); })()), "data", [], "any"falsefalsefalse28)]);
  67.         echo "
  68. ";
  69.         // line 29
  70.         if ((twig_length_filter($this->env, (isset($context["product_filter"]) || array_key_exists("product_filter"$context) ? $context["product_filter"] : (function () { throw new RuntimeError('Variable "product_filter" does not exist.'29$this->source); })())) > 0)) {
  71.             // line 30
  72.             echo "    <div class=\"ui three cards\" id=\"products\" ";
  73.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("products");
  74.             echo ">
  75.         ";
  76.             // line 31
  77.             $context['_parent'] = $context;
  78.             $context['_seq'] = twig_ensure_traversable((isset($context["product_filter"]) || array_key_exists("product_filter"$context) ? $context["product_filter"] : (function () { throw new RuntimeError('Variable "product_filter" does not exist.'31$this->source); })()));
  79.             $context['loop'] = [
  80.               'parent' => $context['_parent'],
  81.               'index0' => 0,
  82.               'index'  => 1,
  83.               'first'  => true,
  84.             ];
  85.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  86.                 $length count($context['_seq']);
  87.                 $context['loop']['revindex0'] = $length 1;
  88.                 $context['loop']['revindex'] = $length;
  89.                 $context['loop']['length'] = $length;
  90.                 $context['loop']['last'] = === $length;
  91.             }
  92.             foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  93.                 // line 32
  94.                 echo "            ";
  95.                 $this->loadTemplate("@SyliusShop/Product/_box.html.twig""@SyliusShop/Product/Index/_main.html.twig"32)->display($context);
  96.                 // line 33
  97.                 echo "            ";
  98.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\DumpExtension']->dump($this->env$context$context["product"]);
  99.                 echo "
  100.         ";
  101.                 ++$context['loop']['index0'];
  102.                 ++$context['loop']['index'];
  103.                 $context['loop']['first'] = false;
  104.                 if (isset($context['loop']['length'])) {
  105.                     --$context['loop']['revindex0'];
  106.                     --$context['loop']['revindex'];
  107.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  108.                 }
  109.             }
  110.             $_parent $context['_parent'];
  111.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  112.             $context array_intersect_key($context$_parent) + $_parent;
  113.             // line 35
  114.             echo "    </div>
  115. ";
  116.         } elseif ((null ===         // line 36
  117. (isset($context["product_filter"]) || array_key_exists("product_filter"$context) ? $context["product_filter"] : (function () { throw new RuntimeError('Variable "product_filter" does not exist.'36$this->source); })()))) {
  118.             // line 37
  119.             echo "    <div class=\"ui three cards\" id=\"products-container\" ";
  120.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("products");
  121.             echo ">
  122.         ";
  123.             // line 38
  124.             $context['_parent'] = $context;
  125.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'38$this->source); })()), "data", [], "any"falsefalsefalse38));
  126.             $context['loop'] = [
  127.               'parent' => $context['_parent'],
  128.               'index0' => 0,
  129.               'index'  => 1,
  130.               'first'  => true,
  131.             ];
  132.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  133.                 $length count($context['_seq']);
  134.                 $context['loop']['revindex0'] = $length 1;
  135.                 $context['loop']['revindex'] = $length;
  136.                 $context['loop']['length'] = $length;
  137.                 $context['loop']['last'] = === $length;
  138.             }
  139.             foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  140.                 // line 39
  141.                 echo "            ";
  142.                 if (array_key_exists("nombreJours"$context)) {
  143.                     // line 40
  144.                     echo "                ";
  145.                     $context['_parent'] = $context;
  146.                     $context['_seq'] = twig_ensure_traversable((isset($context["nombreJours"]) || array_key_exists("nombreJours"$context) ? $context["nombreJours"] : (function () { throw new RuntimeError('Variable "nombreJours" does not exist.'40$this->source); })()));
  147.                     $context['loop'] = [
  148.                       'parent' => $context['_parent'],
  149.                       'index0' => 0,
  150.                       'index'  => 1,
  151.                       'first'  => true,
  152.                     ];
  153.                     if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  154.                         $length count($context['_seq']);
  155.                         $context['loop']['revindex0'] = $length 1;
  156.                         $context['loop']['revindex'] = $length;
  157.                         $context['loop']['length'] = $length;
  158.                         $context['loop']['last'] = === $length;
  159.                     }
  160.                     foreach ($context['_seq'] as $context["id"] => $context["jours"]) {
  161.                         // line 41
  162.                         echo "                    ";
  163.                         if (($context["id"] == twig_get_attribute($this->env$this->source$context["product"], "id", [], "any"falsefalsefalse41))) {
  164.                             // line 42
  165.                             echo "                        ";
  166.                             $this->loadTemplate("@SyliusShop/Product/_box.html.twig""@SyliusShop/Product/Index/_main.html.twig"42)->display(twig_array_merge($context, ["journee" => $context["jours"]]));
  167.                             // line 43
  168.                             echo "                    ";
  169.                         }
  170.                         // line 44
  171.                         echo "                ";
  172.                         ++$context['loop']['index0'];
  173.                         ++$context['loop']['index'];
  174.                         $context['loop']['first'] = false;
  175.                         if (isset($context['loop']['length'])) {
  176.                             --$context['loop']['revindex0'];
  177.                             --$context['loop']['revindex'];
  178.                             $context['loop']['last'] = === $context['loop']['revindex0'];
  179.                         }
  180.                     }
  181.                     $_parent $context['_parent'];
  182.                     unset($context['_seq'], $context['_iterated'], $context['id'], $context['jours'], $context['_parent'], $context['loop']);
  183.                     $context array_intersect_key($context$_parent) + $_parent;
  184.                     // line 45
  185.                     echo "            ";
  186.                 }
  187.                 // line 46
  188.                 echo "        ";
  189.                 ++$context['loop']['index0'];
  190.                 ++$context['loop']['index'];
  191.                 $context['loop']['first'] = false;
  192.                 if (isset($context['loop']['length'])) {
  193.                     --$context['loop']['revindex0'];
  194.                     --$context['loop']['revindex'];
  195.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  196.                 }
  197.             }
  198.             $_parent $context['_parent'];
  199.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  200.             $context array_intersect_key($context$_parent) + $_parent;
  201.             // line 47
  202.             echo "    </div>
  203.     ";
  204.             // line 48
  205.             if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'48$this->source); })()), "data", [], "any"falsefalsefalse48)) < 1)) {
  206.                 // line 49
  207.                 echo "        ";
  208.                 echo twig_call_macro($macros["messages"], "macro_info", ["sylius.ui.no_results_to_display"], 49$context$this->getSourceContext());
  209.                 echo "
  210.     ";
  211.             }
  212.             // line 51
  213.             echo "    <div class=\"ui hidden divider\"></div>
  214.     ";
  215.             // line 53
  216.             echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.index.before_pagination", ["products" => twig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'53$this->source); })()), "data", [], "any"falsefalsefalse53)]);
  217.             echo "
  218.     ";
  219.             // line 55
  220.             echo twig_call_macro($macros["pagination"], "macro_simple", [twig_get_attribute($this->env$this->source, (isset($context["resources"]) || array_key_exists("resources"$context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.'55$this->source); })()), "data", [], "any"falsefalsefalse55)], 55$context$this->getSourceContext());
  221.             echo "
  222. ";
  223.         } else {
  224.             // line 58
  225.             echo "    ";
  226.             echo twig_call_macro($macros["messages"], "macro_info", ["sylius.ui.no_results_to_display"], 58$context$this->getSourceContext());
  227.             echo "
  228. ";
  229.         }
  230.         
  231.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  232.         
  233.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  234.     }
  235.     public function getTemplateName()
  236.     {
  237.         return "@SyliusShop/Product/Index/_main.html.twig";
  238.     }
  239.     public function isTraitable()
  240.     {
  241.         return false;
  242.     }
  243.     public function getDebugInfo()
  244.     {
  245.         return array (  239 => 58,  233 => 55,  228 => 53,  224 => 51,  218 => 49,  216 => 48,  213 => 47,  199 => 46,  196 => 45,  182 => 44,  179 => 43,  176 => 42,  173 => 41,  155 => 40,  152 => 39,  135 => 38,  130 => 37,  128 => 36,  125 => 35,  108 => 33,  105 => 32,  88 => 31,  83 => 30,  81 => 29,  77 => 28,  50 => 4,  47 => 3,  45 => 2,  43 => 1,);
  246.     }
  247.     public function getSourceContext()
  248.     {
  249.         return new Source("{% import '@SyliusUi/Macro/messages.html.twig' as messages %}
  250. {% import '@SyliusUi/Macro/pagination.html.twig' as pagination %}
  251. {{ sylius_template_event('sylius.shop.product.index.search.without_input', _context) }}
  252. <div class=\"filtre-responsive-div\">
  253.    <div class=\"filtre-responsive\">
  254.        <svg width=\"18\" height=\"14\" viewBox=\"0 0 18 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
  255.            <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.354 3.74997H1C0.801088 3.74997 0.610322 3.67096 0.46967 3.5303C0.329018 3.38965 0.25 3.19889 0.25 2.99997C0.25 2.80106 0.329018 2.6103 0.46967 2.46964C0.610322 2.32899 0.801088 2.24997 1 2.24997H10.354C10.5174 1.67405 10.8643 1.16716 11.3419 0.806225C11.8195 0.445286 12.4018 0.25 13.0005 0.25C13.5992 0.25 14.1815 0.445286 14.6591 0.806225C15.1367 1.16716 15.4836 1.67405 15.647 2.24997H17C17.1989 2.24997 17.3897 2.32899 17.5303 2.46964C17.671 2.6103 17.75 2.80106 17.75 2.99997C17.75 3.19889 17.671 3.38965 17.5303 3.5303C17.3897 3.67096 17.1989 3.74997 17 3.74997H15.646C15.4826 4.3259 15.1357 4.83279 14.6581 5.19372C14.1805 5.55466 13.5982 5.74995 12.9995 5.74995C12.4008 5.74995 11.8185 5.55466 11.3409 5.19372C10.8633 4.83279 10.5164 4.3259 10.353 3.74997H10.354ZM11.75 2.99997C11.75 2.66845 11.8817 2.35051 12.1161 2.11609C12.3505 1.88167 12.6685 1.74997 13 1.74997C13.3315 1.74997 13.6495 1.88167 13.8839 2.11609C14.1183 2.35051 14.25 2.66845 14.25 2.99997C14.25 3.3315 14.1183 3.64944 13.8839 3.88386C13.6495 4.11828 13.3315 4.24997 13 4.24997C12.6685 4.24997 12.3505 4.11828 12.1161 3.88386C11.8817 3.64944 11.75 3.3315 11.75 2.99997ZM7.646 11.75H17C17.1989 11.75 17.3897 11.671 17.5303 11.5303C17.671 11.3897 17.75 11.1989 17.75 11C17.75 10.8011 17.671 10.6103 17.5303 10.4696C17.3897 10.329 17.1989 10.25 17 10.25H7.646C7.48227 9.67446 7.13536 9.16803 6.65787 8.80743C6.18038 8.44684 5.59835 8.25176 5 8.25176C4.40165 8.25176 3.81962 8.44684 3.34213 8.80743C2.86464 9.16803 2.51773 9.67446 2.354 10.25H1C0.801088 10.25 0.610322 10.329 0.46967 10.4696C0.329018 10.6103 0.25 10.8011 0.25 11C0.25 11.1989 0.329018 11.3897 0.46967 11.5303C0.610322 11.671 0.801088 11.75 1 11.75H2.354C2.51773 12.3255 2.86464 12.8319 3.34213 13.1925C3.81962 13.5531 4.40165 13.7482 5 13.7482C5.59835 13.7482 6.18038 13.5531 6.65787 13.1925C7.13536 12.8319 7.48227 12.3255 7.646 11.75ZM3.75 11C3.75 10.6685 3.8817 10.3505 4.11612 10.1161C4.35054 9.88167 4.66848 9.74998 5 9.74998C5.33152 9.74998 5.64946 9.88167 5.88388 10.1161C6.1183 10.3505 6.25 10.6685 6.25 11C6.25 11.3315 6.1183 11.6494 5.88388 11.8839C5.64946 12.1183 5.33152 12.25 5 12.25C4.66848 12.25 4.35054 12.1183 4.11612 11.8839C3.8817 11.6494 3.75 11.3315 3.75 11Z\" fill=\"black\"/>
  256.        </svg>
  257.        Filtres
  258.    </div>
  259. </div>
  260. <script>
  261.   var burgerIcon = document.querySelector('.filtre-responsive');
  262.   var CloseIcon = document.querySelector('#close-icon-filter');
  263.   var mobileMenu = document.querySelector('#filtre-container');
  264.   console.log(mobileMenu)
  265.   burgerIcon.addEventListener('click', function() {
  266.     mobileMenu.id = 'filtre-container-visible';
  267.   });
  268.   CloseIcon.addEventListener('click', function() {
  269.     mobileMenu.id = 'filtre-container';
  270.   });
  271. </script>
  272. <div class=\"ui clearing hidden divider\"></div>
  273. {{ sylius_template_event('sylius.shop.product.index.before_list', {'products': resources.data}) }}
  274. {% if product_filter|length > 0 %}
  275.     <div class=\"ui three cards\" id=\"products\" {{ sylius_test_html_attribute('products') }}>
  276.         {% for product in product_filter %}
  277.             {% include '@SyliusShop/Product/_box.html.twig' %}
  278.             {{ dump(product) }}
  279.         {% endfor %}
  280.     </div>
  281. {% elseif product_filter is null %}
  282.     <div class=\"ui three cards\" id=\"products-container\" {{ sylius_test_html_attribute('products') }}>
  283.         {% for product in resources.data %}
  284.             {% if nombreJours is defined %}
  285.                 {% for id, jours in nombreJours %}
  286.                     {% if id == product.id %}
  287.                         {% include '@SyliusShop/Product/_box.html.twig' with {'journee' : jours} %}
  288.                     {% endif %}
  289.                 {% endfor %}
  290.             {% endif %}
  291.         {% endfor %}
  292.     </div>
  293.     {% if resources.data|length < 1 %}
  294.         {{ messages.info('sylius.ui.no_results_to_display') }}
  295.     {% endif %}
  296.     <div class=\"ui hidden divider\"></div>
  297.     {{ sylius_template_event('sylius.shop.product.index.before_pagination', {'products': resources.data}) }}
  298.     {{ pagination.simple(resources.data) }}
  299. {% else %}
  300.     {{ messages.info('sylius.ui.no_results_to_display') }}
  301. {% endif %}
  302. ""@SyliusShop/Product/Index/_main.html.twig""/var/www/Bikers/templates/bundles/SyliusShopBundle/Product/Index/_main.html.twig");
  303.     }
  304. }