var/cache/dev/twig/7c/7cdc162e40277763f21f542795e0dadf.php line 65

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* Components/pagination.html.twig */
  15. class __TwigTemplate_57d3ddf3619c99f54c254f6809155770 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->parent false;
  24.         $this->blocks = [
  25.         ];
  26.         $this->sandbox $this->env->getExtension(SandboxExtension::class);
  27.         $this->checkSecurity();
  28.     }
  29.     protected function doDisplay(array $context, array $blocks = [])
  30.     {
  31.         $macros $this->macros;
  32.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  33.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Components/pagination.html.twig"));
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Components/pagination.html.twig"));
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Components/pagination.html.twig"));
  38.         // line 1
  39.         $context["pages"] = CoreExtension::getAttribute($this->env$this->source, (isset($context["paginator"]) || array_key_exists("paginator"$context) ? $context["paginator"] : (function () { throw new RuntimeError('Variable "paginator" does not exist.'1$this->source); })()), "paginationData", [], "any"falsefalsetrue1);
  40.         // line 2
  41.         yield "
  42. ";
  43.         // line 3
  44.         if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'3$this->source); })()), "pageCount", [], "any"falsefalsetrue3) > 0)) {
  45.             // line 4
  46.             yield "
  47.     <ul class=\"pagination\">
  48.         ";
  49.             // line 6
  50.             if (CoreExtension::getAttribute($this->env$this->source, ($context["pages"] ?? null), "previous", [], "any"truetruetrue6)) {
  51.                 // line 7
  52.                 yield "            <li class=\"first\">
  53.                 <a href=\"";
  54.                 // line 8
  55.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('pimcore_url')->getCallable()(["page" => CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'8$this->source); })()), "first", [], "any"falsefalsetrue8), "division" => $this->extensions['App\Twig\AppExtension']->getSiteDivision()]), "html"nulltrue);
  56.                 yield "\">";
  57.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'8$this->source); })()), "first", [], "any"falsefalsetrue8), 8$this->source), "html"nulltrue);
  58.                 yield "</a>
  59.             </li>
  60.         ";
  61.             }
  62.             // line 11
  63.             yield "        ";
  64.             $context['_parent'] = $context;
  65.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'11$this->source); })()), "pagesInRange", [], "any"falsefalsetrue11));
  66.             foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
  67.                 // line 12
  68.                 yield "            ";
  69.                 if ((((CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'12$this->source); })()), "first", [], "any"falsefalsetrue12) < $context["page"]) && ($context["page"] < CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'12$this->source); })()), "last", [], "any"falsefalsetrue12))) || ($context["page"] == CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'12$this->source); })()), "current", [], "any"falsefalsetrue12)))) {
  70.                     // line 13
  71.                     yield "                ";
  72.                     $context["class"] = ((($context["page"] == CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'13$this->source); })()), "current", [], "any"falsefalsetrue13))) ? ("active") : (""));
  73.                     // line 14
  74.                     yield "                <li
  75.                 ";
  76.                     // line 15
  77.                     if ( !Twig\Extension\CoreExtension::testEmpty((isset($context["class"]) || array_key_exists("class"$context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.'15$this->source); })()))) {
  78.                         // line 16
  79.                         yield "                    class=\"";
  80.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["class"]) || array_key_exists("class"$context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.'16$this->source); })()), 16$this->source), "html"nulltrue);
  81.                         yield "\"
  82.                 ";
  83.                     }
  84.                     // line 17
  85.                     yield ">
  86.                     <a href=\"";
  87.                     // line 18
  88.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('pimcore_url')->getCallable()(["page" => $context["page"], "division" => $this->extensions['App\Twig\AppExtension']->getSiteDivision()]), "html"nulltrue);
  89.                     yield "\">";
  90.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed($context["page"], 18$this->source), "html"nulltrue);
  91.                     yield "</a>
  92.                 </li>
  93.             ";
  94.                 }
  95.                 // line 21
  96.                 yield "        ";
  97.             }
  98.             $_parent $context['_parent'];
  99.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['page'], $context['_parent'], $context['loop']);
  100.             $context array_intersect_key($context$_parent) + $_parent;
  101.             // line 22
  102.             yield "
  103.         ";
  104.             // line 23
  105.             if (CoreExtension::getAttribute($this->env$this->source, ($context["pages"] ?? null), "next", [], "any"truetruetrue23)) {
  106.                 // line 24
  107.                 yield "            <li class=\"last\">
  108.                 <a href=\"";
  109.                 // line 25
  110.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('pimcore_url')->getCallable()(["page" => CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'25$this->source); })()), "last", [], "any"falsefalsetrue25), "division" => $this->extensions['App\Twig\AppExtension']->getSiteDivision()]), "html"nulltrue);
  111.                 yield "\">";
  112.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["pages"]) || array_key_exists("pages"$context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.'25$this->source); })()), "last", [], "any"falsefalsetrue25), 25$this->source), "html"nulltrue);
  113.                 yield "</a>
  114.             </li>
  115.         ";
  116.             }
  117.             // line 29
  118.             yield "    </ul>
  119. ";
  120.         }
  121.         
  122.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  123.         
  124.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  125.         
  126.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  127.         return; yield '';
  128.     }
  129.     /**
  130.      * @codeCoverageIgnore
  131.      */
  132.     public function getTemplateName()
  133.     {
  134.         return "Components/pagination.html.twig";
  135.     }
  136.     /**
  137.      * @codeCoverageIgnore
  138.      */
  139.     public function isTraitable()
  140.     {
  141.         return false;
  142.     }
  143.     /**
  144.      * @codeCoverageIgnore
  145.      */
  146.     public function getDebugInfo()
  147.     {
  148.         return array (  129 => 29,  120 => 25,  117 => 24,  115 => 23,  112 => 22,  106 => 21,  98 => 18,  95 => 17,  89 => 16,  87 => 15,  84 => 14,  81 => 13,  78 => 12,  73 => 11,  65 => 8,  62 => 7,  60 => 6,  56 => 4,  54 => 3,  51 => 2,  49 => 1,);
  149.     }
  150.     public function getSourceContext()
  151.     {
  152.         return new Source("{% set pages = paginator.paginationData %}
  153. {% if pages.pageCount > 0 %}
  154.     <ul class=\"pagination\">
  155.         {% if pages.previous is defined %}
  156.             <li class=\"first\">
  157.                 <a href=\"{{ pimcore_url({ page: pages.first, 'division': getSiteDivision() }) }}\">{{ pages.first }}</a>
  158.             </li>
  159.         {% endif %}
  160.         {% for page in pages.pagesInRange %}
  161.             {% if (pages.first < page) and (page < pages.last) or page == pages.current %}
  162.                 {% set class = page == pages.current ? 'active' %}
  163.                 <li
  164.                 {% if class is not empty %}
  165.                     class=\"{{ class }}\"
  166.                 {% endif %}>
  167.                     <a href=\"{{ pimcore_url({ page: page, 'division': getSiteDivision() }) }}\">{{ page }}</a>
  168.                 </li>
  169.             {% endif %}
  170.         {% endfor %}
  171.         {% if pages.next is defined %}
  172.             <li class=\"last\">
  173.                 <a href=\"{{ pimcore_url({ page: pages.last, 'division': getSiteDivision() }) }}\">{{ pages.last }}</a>
  174.             </li>
  175.         {% endif %}
  176.     </ul>
  177. {% endif %}
  178. ""Components/pagination.html.twig""/var/www/webovi/stoelting/pimcore/templates/Components/pagination.html.twig");
  179.     }
  180.     
  181.     public function checkSecurity()
  182.     {
  183.         static $tags = array("set" => 1"if" => 3"for" => 11);
  184.         static $filters = array("escape" => 8);
  185.         static $functions = array("pimcore_url" => 8"getSiteDivision" => 8);
  186.         try {
  187.             $this->sandbox->checkSecurity(
  188.                 ['set''if''for'],
  189.                 ['escape'],
  190.                 ['pimcore_url''getSiteDivision'],
  191.                 $this->source
  192.             );
  193.         } catch (SecurityError $e) {
  194.             $e->setSourceContext($this->source);
  195.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  196.                 $e->setTemplateLine($tags[$e->getTagName()]);
  197.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  198.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  199.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  200.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  201.             }
  202.             throw $e;
  203.         }
  204.     }
  205. }