var/cache/dev/twig/66/66c9cfd292b1b0fa22806be0c682f813.php line 78

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/Common/Macro/pagination.html.twig */
  14. class __TwigTemplate_34c1779539588ad6288f3fa91c5fae9e 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/Common/Macro/pagination.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/Common/Macro/pagination.html.twig"));
  33.         // line 6
  34.         echo "
  35. ";
  36.         
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  38.         
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  40.     }
  41.     // line 1
  42.     public function macro_simple($__paginator__ null$__options__ null, ...$__varargs__)
  43.     {
  44.         $macros $this->macros;
  45.         $context $this->env->mergeGlobals([
  46.             "paginator" => $__paginator__,
  47.             "options" => $__options__,
  48.             "varargs" => $__varargs__,
  49.         ]);
  50.         $blocks = [];
  51.         ob_start();
  52.         try {
  53.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  54.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""simple"));
  55.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  56.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""simple"));
  57.             // line 2
  58.             echo "    ";
  59.             if (twig_get_attribute($this->env$this->source, (isset($context["paginator"]) || array_key_exists("paginator"$context) ? $context["paginator"] : (function () { throw new RuntimeError('Variable "paginator" does not exist.'2$this->source); })()), "haveToPaginate", [], "method"falsefalsefalse2)) {
  60.                 // line 3
  61.                 echo "        ";
  62.                 echo $this->env->getRuntime('Pagerfanta\Twig\Extension\PagerfantaRuntime')->renderPagerfanta((isset($context["paginator"]) || array_key_exists("paginator"$context) ? $context["paginator"] : (function () { throw new RuntimeError('Variable "paginator" does not exist.'3$this->source); })()), "twitter_bootstrap4_translated", ((array_key_exists("options"$context)) ? (_twig_default_filter((isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'3$this->source); })()), [])) : ([])));
  63.                 echo "
  64.     ";
  65.             }
  66.             
  67.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  68.             
  69.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  70.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  71.         } finally {
  72.             ob_end_clean();
  73.         }
  74.     }
  75.     // line 7
  76.     public function macro_perPage($__paginator__ null$__paginationLimits__ null, ...$__varargs__)
  77.     {
  78.         $macros $this->macros;
  79.         $context $this->env->mergeGlobals([
  80.             "paginator" => $__paginator__,
  81.             "paginationLimits" => $__paginationLimits__,
  82.             "varargs" => $__varargs__,
  83.         ]);
  84.         $blocks = [];
  85.         ob_start();
  86.         try {
  87.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  88.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""perPage"));
  89.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  90.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""perPage"));
  91.             // line 8
  92.             echo "    <div class=\"dropdown\">
  93.         <button class=\"btn btn-link dropdown-toggle\" type=\"button\">
  94.             ";
  95.             // line 10
  96.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.show"), "html"nulltrue);
  97.             echo " ";
  98.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["paginator"]) || array_key_exists("paginator"$context) ? $context["paginator"] : (function () { throw new RuntimeError('Variable "paginator" does not exist.'10$this->source); })()), "maxPerPage", [], "any"falsefalsefalse10), "html"nulltrue);
  99.             echo "
  100.         </button> 
  101.         
  102.         <div class=\"dropdown-menu\">
  103.         ";
  104.             // line 14
  105.             $context['_parent'] = $context;
  106.             $context['_seq'] = twig_ensure_traversable((isset($context["paginationLimits"]) || array_key_exists("paginationLimits"$context) ? $context["paginationLimits"] : (function () { throw new RuntimeError('Variable "paginationLimits" does not exist.'14$this->source); })()));
  107.             foreach ($context['_seq'] as $context["_key"] => $context["limit"]) {
  108.                 if (($context["limit"] != twig_get_attribute($this->env$this->source, (isset($context["paginator"]) || array_key_exists("paginator"$context) ? $context["paginator"] : (function () { throw new RuntimeError('Variable "paginator" does not exist.'14$this->source); })()), "maxPerPage", [], "any"falsefalsefalse14))) {
  109.                     // line 15
  110.                     echo "            ";
  111.                     $context["path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(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.'15$this->source); })()), "request", [], "any"falsefalsefalse15), "attributes", [], "any"falsefalsefalse15), "get", [=> "_route"], "method"falsefalsefalse15), twig_array_merge(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.'15$this->source); })()), "request", [], "any"falsefalsefalse15), "attributes", [], "any"falsefalsefalse15), "get", [=> "_route_params"], "method"falsefalsefalse15), twig_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.'15$this->source); })()), "request", [], "any"falsefalsefalse15), "query", [], "any"falsefalsefalse15)), ["limit" => $context["limit"]]));
  112.                     // line 16
  113.                     echo "            <a class=\"dropdown-item\" href=\"";
  114.                     echo twig_escape_filter($this->env, (isset($context["path"]) || array_key_exists("path"$context) ? $context["path"] : (function () { throw new RuntimeError('Variable "path" does not exist.'16$this->source); })()), "html"nulltrue);
  115.                     echo "\">";
  116.                     echo twig_escape_filter($this->env$context["limit"], "html"nulltrue);
  117.                     echo "</a>
  118.         ";
  119.                 }
  120.             }
  121.             $_parent $context['_parent'];
  122.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['limit'], $context['_parent'], $context['loop']);
  123.             $context array_intersect_key($context$_parent) + $_parent;
  124.             // line 18
  125.             echo "        </div>
  126.     </div>
  127. ";
  128.             
  129.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  130.             
  131.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  132.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  133.         } finally {
  134.             ob_end_clean();
  135.         }
  136.     }
  137.     public function getTemplateName()
  138.     {
  139.         return "@SyliusShop/Common/Macro/pagination.html.twig";
  140.     }
  141.     public function isTraitable()
  142.     {
  143.         return false;
  144.     }
  145.     public function getDebugInfo()
  146.     {
  147.         return array (  149 => 18,  137 => 16,  134 => 15,  129 => 14,  120 => 10,  116 => 8,  96 => 7,  77 => 3,  74 => 2,  54 => 1,  43 => 6,);
  148.     }
  149.     public function getSourceContext()
  150.     {
  151.         return new Source("{% macro simple(paginator, options) %}
  152.     {% if paginator.haveToPaginate() %}
  153.         {{ pagerfanta(paginator, 'twitter_bootstrap4_translated', options|default({})) }}
  154.     {% endif %}
  155. {% endmacro %}
  156. {% macro perPage(paginator, paginationLimits) %}
  157.     <div class=\"dropdown\">
  158.         <button class=\"btn btn-link dropdown-toggle\" type=\"button\">
  159.             {{ 'sylius.ui.show'|trans }} {{ paginator.maxPerPage }}
  160.         </button> 
  161.         
  162.         <div class=\"dropdown-menu\">
  163.         {% for limit in paginationLimits if limit != paginator.maxPerPage %}
  164.             {% set path = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')|merge(app.request.query)|merge({'limit': limit})) %}
  165.             <a class=\"dropdown-item\" href=\"{{ path }}\">{{ limit }}</a>
  166.         {% endfor %}
  167.         </div>
  168.     </div>
  169. {% endmacro %}
  170. ""@SyliusShop/Common/Macro/pagination.html.twig""/var/www/html/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Common/Macro/pagination.html.twig");
  171.     }
  172. }