<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Components/pagination.html.twig */
class __TwigTemplate_57d3ddf3619c99f54c254f6809155770 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension(SandboxExtension::class);
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Components/pagination.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Components/pagination.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Components/pagination.html.twig"));
// line 1
$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", false, false, true, 1);
// line 2
yield "
";
// line 3
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", false, false, true, 3) > 0)) {
// line 4
yield "
<ul class=\"pagination\">
";
// line 6
if (CoreExtension::getAttribute($this->env, $this->source, ($context["pages"] ?? null), "previous", [], "any", true, true, true, 6)) {
// line 7
yield " <li class=\"first\">
<a href=\"";
// line 8
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", false, false, true, 8), "division" => $this->extensions['App\Twig\AppExtension']->getSiteDivision()]), "html", null, true);
yield "\">";
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", false, false, true, 8), 8, $this->source), "html", null, true);
yield "</a>
</li>
";
}
// line 11
yield " ";
$context['_parent'] = $context;
$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", false, false, true, 11));
foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
// line 12
yield " ";
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", false, false, true, 12) < $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", false, false, true, 12))) || ($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", false, false, true, 12)))) {
// line 13
yield " ";
$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", false, false, true, 13))) ? ("active") : (""));
// line 14
yield " <li
";
// line 15
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); })()))) {
// line 16
yield " class=\"";
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", null, true);
yield "\"
";
}
// line 17
yield ">
<a href=\"";
// line 18
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", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed($context["page"], 18, $this->source), "html", null, true);
yield "</a>
</li>
";
}
// line 21
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['page'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
yield "
";
// line 23
if (CoreExtension::getAttribute($this->env, $this->source, ($context["pages"] ?? null), "next", [], "any", true, true, true, 23)) {
// line 24
yield " <li class=\"last\">
<a href=\"";
// line 25
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", false, false, true, 25), "division" => $this->extensions['App\Twig\AppExtension']->getSiteDivision()]), "html", null, true);
yield "\">";
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", false, false, true, 25), 25, $this->source), "html", null, true);
yield "</a>
</li>
";
}
// line 29
yield " </ul>
";
}
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Components/pagination.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% set pages = paginator.paginationData %}
{% if pages.pageCount > 0 %}
<ul class=\"pagination\">
{% if pages.previous is defined %}
<li class=\"first\">
<a href=\"{{ pimcore_url({ page: pages.first, 'division': getSiteDivision() }) }}\">{{ pages.first }}</a>
</li>
{% endif %}
{% for page in pages.pagesInRange %}
{% if (pages.first < page) and (page < pages.last) or page == pages.current %}
{% set class = page == pages.current ? 'active' %}
<li
{% if class is not empty %}
class=\"{{ class }}\"
{% endif %}>
<a href=\"{{ pimcore_url({ page: page, 'division': getSiteDivision() }) }}\">{{ page }}</a>
</li>
{% endif %}
{% endfor %}
{% if pages.next is defined %}
<li class=\"last\">
<a href=\"{{ pimcore_url({ page: pages.last, 'division': getSiteDivision() }) }}\">{{ pages.last }}</a>
</li>
{% endif %}
</ul>
{% endif %}
", "Components/pagination.html.twig", "/var/www/webovi/stoelting/pimcore/templates/Components/pagination.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 1, "if" => 3, "for" => 11);
static $filters = array("escape" => 8);
static $functions = array("pimcore_url" => 8, "getSiteDivision" => 8);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['escape'],
['pimcore_url', 'getSiteDivision'],
$this->source
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}