var/cache/dev/twig/9e/9e2dfb34dec24aa4fc5236e1ffb60309.php line 33

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/_sorting.html.twig */
  14. class __TwigTemplate_4a01ef0aa8c0be202f98ef414e30941c 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/_sorting.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/_sorting.html.twig"));
  33.         // line 1
  34.         if ((twig_get_attribute($this->env$this->sourcetwig_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.'1$this->source); })()), "data", [], "any"falsefalsefalse1), "nbResults", [], "any"falsefalsefalse1) > 0)) {
  35.             // line 2
  36.             echo "
  37. ";
  38.             // line 3
  39.             $context["route"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'3$this->source); })()), "request", [], "any"falsefalsefalse3), "attributes", [], "any"falsefalsefalse3), "get", [=> "_route"], "method"falsefalsefalse3);
  40.             // line 4
  41.             $context["route_parameters"] = twig_array_merge(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'4$this->source); })()), "request", [], "any"falsefalsefalse4), "attributes", [], "any"falsefalsefalse4), "get", [=> "_route_params"], "method"falsefalsefalse4), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'4$this->source); })()), "request", [], "any"falsefalsefalse4), "query", [], "any"falsefalsefalse4), "all", [], "any"falsefalsefalse4));
  42.             // line 5
  43.             echo "
  44. ";
  45.             // line 6
  46.             $context["criteria"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'6$this->source); })()), "request", [], "any"falsefalsefalse6), "query", [], "any"falsefalsefalse6), "get", [=> "criteria"=> []], "method"falsefalsefalse6);
  47.             // line 7
  48.             echo "
  49. ";
  50.             // line 8
  51.             $context["default_path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route"$context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.'8$this->source); })()), twig_array_merge((isset($context["route_parameters"]) || array_key_exists("route_parameters"$context) ? $context["route_parameters"] : (function () { throw new RuntimeError('Variable "route_parameters" does not exist.'8$this->source); })()), ["sorting" => null"criteria" => (isset($context["criteria"]) || array_key_exists("criteria"$context) ? $context["criteria"] : (function () { throw new RuntimeError('Variable "criteria" does not exist.'8$this->source); })())]));
  52.             // line 9
  53.             $context["from_a_to_z_path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route"$context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.'9$this->source); })()), twig_array_merge((isset($context["route_parameters"]) || array_key_exists("route_parameters"$context) ? $context["route_parameters"] : (function () { throw new RuntimeError('Variable "route_parameters" does not exist.'9$this->source); })()), ["sorting" => ["name" => "asc"], "criteria" => (isset($context["criteria"]) || array_key_exists("criteria"$context) ? $context["criteria"] : (function () { throw new RuntimeError('Variable "criteria" does not exist.'9$this->source); })())]));
  54.             // line 10
  55.             $context["from_z_to_a_path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route"$context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.'10$this->source); })()), twig_array_merge((isset($context["route_parameters"]) || array_key_exists("route_parameters"$context) ? $context["route_parameters"] : (function () { throw new RuntimeError('Variable "route_parameters" does not exist.'10$this->source); })()), ["sorting" => ["name" => "desc"], "criteria" => (isset($context["criteria"]) || array_key_exists("criteria"$context) ? $context["criteria"] : (function () { throw new RuntimeError('Variable "criteria" does not exist.'10$this->source); })())]));
  56.             // line 11
  57.             $context["oldest_first_path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route"$context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.'11$this->source); })()), twig_array_merge((isset($context["route_parameters"]) || array_key_exists("route_parameters"$context) ? $context["route_parameters"] : (function () { throw new RuntimeError('Variable "route_parameters" does not exist.'11$this->source); })()), ["sorting" => ["createdAt" => "asc"], "criteria" => (isset($context["criteria"]) || array_key_exists("criteria"$context) ? $context["criteria"] : (function () { throw new RuntimeError('Variable "criteria" does not exist.'11$this->source); })())]));
  58.             // line 12
  59.             $context["newest_first_path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route"$context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.'12$this->source); })()), twig_array_merge((isset($context["route_parameters"]) || array_key_exists("route_parameters"$context) ? $context["route_parameters"] : (function () { throw new RuntimeError('Variable "route_parameters" does not exist.'12$this->source); })()), ["sorting" => ["createdAt" => "desc"], "criteria" => (isset($context["criteria"]) || array_key_exists("criteria"$context) ? $context["criteria"] : (function () { throw new RuntimeError('Variable "criteria" does not exist.'12$this->source); })())]));
  60.             // line 13
  61.             $context["cheapest_first_path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route"$context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.'13$this->source); })()), twig_array_merge((isset($context["route_parameters"]) || array_key_exists("route_parameters"$context) ? $context["route_parameters"] : (function () { throw new RuntimeError('Variable "route_parameters" does not exist.'13$this->source); })()), ["sorting" => ["price" => "asc"], "criteria" => (isset($context["criteria"]) || array_key_exists("criteria"$context) ? $context["criteria"] : (function () { throw new RuntimeError('Variable "criteria" does not exist.'13$this->source); })())]));
  62.             // line 14
  63.             $context["most_expensive_first_path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath((isset($context["route"]) || array_key_exists("route"$context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.'14$this->source); })()), twig_array_merge((isset($context["route_parameters"]) || array_key_exists("route_parameters"$context) ? $context["route_parameters"] : (function () { throw new RuntimeError('Variable "route_parameters" does not exist.'14$this->source); })()), ["sorting" => ["price" => "desc"], "criteria" => (isset($context["criteria"]) || array_key_exists("criteria"$context) ? $context["criteria"] : (function () { throw new RuntimeError('Variable "criteria" does not exist.'14$this->source); })())]));
  64.             // line 15
  65.             echo "
  66. ";
  67.             // line 16
  68.             if (twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'16$this->source); })()), "request", [], "any"falsefalsefalse16), "query", [], "any"falsefalsefalse16), "get", [=> "sorting"], "method"falsefalsefalse16))) {
  69.                 // line 17
  70.                 echo "    ";
  71.                 $context["current_sorting_label"] = twig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.by_position"));
  72.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 18
  73. ($context["app"] ?? null), "request", [], "any"falsetruefalse18), "query", [], "any"falsetruefalse18), "get", [=> "sorting"], "method"falsetruefalse18), "name", [], "any"truetruefalse18) && (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'18$this->source); })()), "request", [], "any"falsefalsefalse18), "query", [], "any"falsefalsefalse18), "get", [=> "sorting"], "method"falsefalsefalse18), "name", [], "any"falsefalsefalse18) == "asc"))) {
  74.                 // line 19
  75.                 echo "    ";
  76.                 $context["current_sorting_label"] = twig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.from_a_to_z"));
  77.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 20
  78. ($context["app"] ?? null), "request", [], "any"falsetruefalse20), "query", [], "any"falsetruefalse20), "get", [=> "sorting"], "method"falsetruefalse20), "name", [], "any"truetruefalse20) && (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'20$this->source); })()), "request", [], "any"falsefalsefalse20), "query", [], "any"falsefalsefalse20), "get", [=> "sorting"], "method"falsefalsefalse20), "name", [], "any"falsefalsefalse20) == "desc"))) {
  79.                 // line 21
  80.                 echo "    ";
  81.                 $context["current_sorting_label"] = twig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.from_z_to_a"));
  82.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 22
  83. ($context["app"] ?? null), "request", [], "any"falsetruefalse22), "query", [], "any"falsetruefalse22), "get", [=> "sorting"], "method"falsetruefalse22), "createdAt", [], "any"truetruefalse22) && (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'22$this->source); })()), "request", [], "any"falsefalsefalse22), "query", [], "any"falsefalsefalse22), "get", [=> "sorting"], "method"falsefalsefalse22), "createdAt", [], "any"falsefalsefalse22) == "desc"))) {
  84.                 // line 23
  85.                 echo "    ";
  86.                 $context["current_sorting_label"] = twig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.newest_first"));
  87.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 24
  88. ($context["app"] ?? null), "request", [], "any"falsetruefalse24), "query", [], "any"falsetruefalse24), "get", [=> "sorting"], "method"falsetruefalse24), "createdAt", [], "any"truetruefalse24) && (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'24$this->source); })()), "request", [], "any"falsefalsefalse24), "query", [], "any"falsefalsefalse24), "get", [=> "sorting"], "method"falsefalsefalse24), "createdAt", [], "any"falsefalsefalse24) == "asc"))) {
  89.                 // line 25
  90.                 echo "    ";
  91.                 $context["current_sorting_label"] = twig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.oldest_first"));
  92.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 26
  93. ($context["app"] ?? null), "request", [], "any"falsetruefalse26), "query", [], "any"falsetruefalse26), "get", [=> "sorting"], "method"falsetruefalse26), "price", [], "any"truetruefalse26) && (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'26$this->source); })()), "request", [], "any"falsefalsefalse26), "query", [], "any"falsefalsefalse26), "get", [=> "sorting"], "method"falsefalsefalse26), "price", [], "any"falsefalsefalse26) == "asc"))) {
  94.                 // line 27
  95.                 echo "    ";
  96.                 $context["current_sorting_label"] = twig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.cheapest_first"));
  97.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 28
  98. ($context["app"] ?? null), "request", [], "any"falsetruefalse28), "query", [], "any"falsetruefalse28), "get", [=> "sorting"], "method"falsetruefalse28), "price", [], "any"truetruefalse28) && (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'28$this->source); })()), "request", [], "any"falsefalsefalse28), "query", [], "any"falsefalsefalse28), "get", [=> "sorting"], "method"falsefalsefalse28), "price", [], "any"falsefalsefalse28) == "desc"))) {
  99.                 // line 29
  100.                 echo "    ";
  101.                 $context["current_sorting_label"] = twig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.most_expensive_first"));
  102.             }
  103.             // line 31
  104.             echo "
  105. <div class=\"ui right floated small header\">
  106.     <div class=\"content\">
  107.         ";
  108.             // line 34
  109.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.sort"), "html"nulltrue);
  110.             echo "
  111.         <div class=\"ui inline dropdown\">
  112.             <div class=\"text\">";
  113.             // line 36
  114.             echo twig_escape_filter($this->env, (isset($context["current_sorting_label"]) || array_key_exists("current_sorting_label"$context) ? $context["current_sorting_label"] : (function () { throw new RuntimeError('Variable "current_sorting_label" does not exist.'36$this->source); })()), "html"nulltrue);
  115.             echo "</div>
  116.             <i class=\"dropdown icon\"></i>
  117.             <div class=\"menu\">
  118.                 <a class=\"item\" href=\"";
  119.             // line 39
  120.             echo twig_escape_filter($this->env, (isset($context["default_path"]) || array_key_exists("default_path"$context) ? $context["default_path"] : (function () { throw new RuntimeError('Variable "default_path" does not exist.'39$this->source); })()), "html"nulltrue);
  121.             echo "\" data-text=\"";
  122.             echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.by_position")), "html"nulltrue);
  123.             echo "\">";
  124.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.by_position"), "html"nulltrue);
  125.             echo "</a>
  126.                 <a class=\"item\" href=\"";
  127.             // line 40
  128.             echo twig_escape_filter($this->env, (isset($context["from_a_to_z_path"]) || array_key_exists("from_a_to_z_path"$context) ? $context["from_a_to_z_path"] : (function () { throw new RuntimeError('Variable "from_a_to_z_path" does not exist.'40$this->source); })()), "html"nulltrue);
  129.             echo "\" data-text=\"";
  130.             echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.from_a_to_z")), "html"nulltrue);
  131.             echo "\">";
  132.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.from_a_to_z"), "html"nulltrue);
  133.             echo "</a>
  134.                 <a class=\"item\" href=\"";
  135.             // line 41
  136.             echo twig_escape_filter($this->env, (isset($context["from_z_to_a_path"]) || array_key_exists("from_z_to_a_path"$context) ? $context["from_z_to_a_path"] : (function () { throw new RuntimeError('Variable "from_z_to_a_path" does not exist.'41$this->source); })()), "html"nulltrue);
  137.             echo "\" data-text=\"";
  138.             echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.from_z_to_a")), "html"nulltrue);
  139.             echo "\">";
  140.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.from_z_to_a"), "html"nulltrue);
  141.             echo "</a>
  142.                 <a class=\"item\" href=\"";
  143.             // line 42
  144.             echo twig_escape_filter($this->env, (isset($context["newest_first_path"]) || array_key_exists("newest_first_path"$context) ? $context["newest_first_path"] : (function () { throw new RuntimeError('Variable "newest_first_path" does not exist.'42$this->source); })()), "html"nulltrue);
  145.             echo "\" data-text=\"";
  146.             echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.newest_first")), "html"nulltrue);
  147.             echo "\">";
  148.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.newest_first"), "html"nulltrue);
  149.             echo "</a>
  150.                 <a class=\"item\" href=\"";
  151.             // line 43
  152.             echo twig_escape_filter($this->env, (isset($context["oldest_first_path"]) || array_key_exists("oldest_first_path"$context) ? $context["oldest_first_path"] : (function () { throw new RuntimeError('Variable "oldest_first_path" does not exist.'43$this->source); })()), "html"nulltrue);
  153.             echo "\" data-text=\"";
  154.             echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.oldest_first")), "html"nulltrue);
  155.             echo "\">";
  156.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.oldest_first"), "html"nulltrue);
  157.             echo "</a>
  158.                 <a class=\"item\" href=\"";
  159.             // line 44
  160.             echo twig_escape_filter($this->env, (isset($context["cheapest_first_path"]) || array_key_exists("cheapest_first_path"$context) ? $context["cheapest_first_path"] : (function () { throw new RuntimeError('Variable "cheapest_first_path" does not exist.'44$this->source); })()), "html"nulltrue);
  161.             echo "\" data-text=\"";
  162.             echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.cheapest_first")), "html"nulltrue);
  163.             echo "\">";
  164.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.cheapest_first"), "html"nulltrue);
  165.             echo "</a>
  166.                 <a class=\"item\" href=\"";
  167.             // line 45
  168.             echo twig_escape_filter($this->env, (isset($context["most_expensive_first_path"]) || array_key_exists("most_expensive_first_path"$context) ? $context["most_expensive_first_path"] : (function () { throw new RuntimeError('Variable "most_expensive_first_path" does not exist.'45$this->source); })()), "html"nulltrue);
  169.             echo "\" data-text=\"";
  170.             echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.most_expensive_first")), "html"nulltrue);
  171.             echo "\">";
  172.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.most_expensive_first"), "html"nulltrue);
  173.             echo "</a>
  174.             </div>
  175.         </div>
  176.     </div>
  177. </div>
  178. ";
  179.         }
  180.         
  181.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  182.         
  183.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  184.     }
  185.     public function getTemplateName()
  186.     {
  187.         return "@SyliusShop/Product/Index/_sorting.html.twig";
  188.     }
  189.     public function isTraitable()
  190.     {
  191.         return false;
  192.     }
  193.     public function getDebugInfo()
  194.     {
  195.         return array (  177 => 45,  169 => 44,  161 => 43,  153 => 42,  145 => 41,  137 => 40,  129 => 39,  123 => 36,  118 => 34,  113 => 31,  109 => 29,  107 => 28,  104 => 27,  102 => 26,  99 => 25,  97 => 24,  94 => 23,  92 => 22,  89 => 21,  87 => 20,  84 => 19,  82 => 18,  79 => 17,  77 => 16,  74 => 15,  72 => 14,  70 => 13,  68 => 12,  66 => 11,  64 => 10,  62 => 9,  60 => 8,  57 => 7,  55 => 6,  52 => 5,  50 => 4,  48 => 3,  45 => 2,  43 => 1,);
  196.     }
  197.     public function getSourceContext()
  198.     {
  199.         return new Source("{% if resources.data.nbResults > 0 %}
  200. {% set route = app.request.attributes.get('_route') %}
  201. {% set route_parameters = app.request.attributes.get('_route_params')|merge(app.request.query.all) %}
  202. {% set criteria = app.request.query.get('criteria', {}) %}
  203. {% set default_path = path(route, route_parameters|merge({'sorting': null, 'criteria': criteria})) %}
  204. {% set from_a_to_z_path = path(route, route_parameters|merge({'sorting': {'name': 'asc'}, 'criteria': criteria})) %}
  205. {% set from_z_to_a_path = path(route, route_parameters|merge({'sorting': {'name': 'desc'}, 'criteria': criteria})) %}
  206. {% set oldest_first_path = path(route, route_parameters|merge({'sorting': {'createdAt': 'asc'}, 'criteria': criteria})) %}
  207. {% set newest_first_path = path(route, route_parameters|merge({'sorting': {'createdAt': 'desc'}, 'criteria': criteria})) %}
  208. {% set cheapest_first_path = path(route, route_parameters|merge({'sorting': {'price': 'asc'}, 'criteria': criteria})) %}
  209. {% set most_expensive_first_path = path(route, route_parameters|merge({'sorting': {'price': 'desc'}, 'criteria': criteria})) %}
  210. {% if app.request.query.get('sorting') is empty %}
  211.     {% set current_sorting_label = 'sylius.ui.by_position'|trans|lower %}
  212. {% elseif app.request.query.get('sorting').name is defined and app.request.query.get('sorting').name == 'asc'%}
  213.     {% set current_sorting_label = 'sylius.ui.from_a_to_z'|trans|lower %}
  214. {% elseif app.request.query.get('sorting').name is defined and app.request.query.get('sorting').name == 'desc'%}
  215.     {% set current_sorting_label = 'sylius.ui.from_z_to_a'|trans|lower %}
  216. {% elseif app.request.query.get('sorting').createdAt is defined and app.request.query.get('sorting').createdAt == 'desc'%}
  217.     {% set current_sorting_label = 'sylius.ui.newest_first'|trans|lower %}
  218. {% elseif app.request.query.get('sorting').createdAt is defined and app.request.query.get('sorting').createdAt == 'asc'%}
  219.     {% set current_sorting_label = 'sylius.ui.oldest_first'|trans|lower %}
  220. {% elseif app.request.query.get('sorting').price is defined and app.request.query.get('sorting').price == 'asc'%}
  221.     {% set current_sorting_label = 'sylius.ui.cheapest_first'|trans|lower %}
  222. {% elseif app.request.query.get('sorting').price is defined and app.request.query.get('sorting').price == 'desc' %}
  223.     {% set current_sorting_label = 'sylius.ui.most_expensive_first'|trans|lower %}
  224. {% endif %}
  225. <div class=\"ui right floated small header\">
  226.     <div class=\"content\">
  227.         {{ 'sylius.ui.sort'|trans }}
  228.         <div class=\"ui inline dropdown\">
  229.             <div class=\"text\">{{ current_sorting_label }}</div>
  230.             <i class=\"dropdown icon\"></i>
  231.             <div class=\"menu\">
  232.                 <a class=\"item\" href=\"{{ default_path }}\" data-text=\"{{ 'sylius.ui.by_position'|trans|lower }}\">{{ 'sylius.ui.by_position'|trans }}</a>
  233.                 <a class=\"item\" href=\"{{ from_a_to_z_path }}\" data-text=\"{{ 'sylius.ui.from_a_to_z'|trans|lower }}\">{{ 'sylius.ui.from_a_to_z'|trans }}</a>
  234.                 <a class=\"item\" href=\"{{ from_z_to_a_path }}\" data-text=\"{{ 'sylius.ui.from_z_to_a'|trans|lower }}\">{{ 'sylius.ui.from_z_to_a'|trans }}</a>
  235.                 <a class=\"item\" href=\"{{ newest_first_path }}\" data-text=\"{{ 'sylius.ui.newest_first'|trans|lower }}\">{{ 'sylius.ui.newest_first'|trans }}</a>
  236.                 <a class=\"item\" href=\"{{ oldest_first_path }}\" data-text=\"{{ 'sylius.ui.oldest_first'|trans|lower }}\">{{ 'sylius.ui.oldest_first'|trans }}</a>
  237.                 <a class=\"item\" href=\"{{ cheapest_first_path }}\" data-text=\"{{ 'sylius.ui.cheapest_first'|trans|lower }}\">{{ 'sylius.ui.cheapest_first'|trans }}</a>
  238.                 <a class=\"item\" href=\"{{ most_expensive_first_path }}\" data-text=\"{{ 'sylius.ui.most_expensive_first'|trans|lower }}\">{{ 'sylius.ui.most_expensive_first'|trans }}</a>
  239.             </div>
  240.         </div>
  241.     </div>
  242. </div>
  243. {% endif %}
  244. ""@SyliusShop/Product/Index/_sorting.html.twig""/var/www/Bikers/vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/views/Product/Index/_sorting.html.twig");
  245.     }
  246. }