<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* navigation/footer.html.twig */
class __TwigTemplate_e1b3be241c980e878f8904be0b3cc6b7 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('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "navigation/footer.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "navigation/footer.html.twig"));
// line 6
$context["navStartNode"] = twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 6, $this->source); })()), "getProperty", [0 => "navigation-root-primary"], "method", false, false, true, 6);
// line 7
echo "
";
// line 8
if (( !$this->env->getTest('instanceof')->getCallable()((isset($context["navStartNode"]) || array_key_exists("navStartNode", $context) ? $context["navStartNode"] : (function () { throw new RuntimeError('Variable "navStartNode" does not exist.', 8, $this->source); })()), "\\Pimcore\\Model\\Document\\Link") && !$this->env->getTest('instanceof')->getCallable()((isset($context["navStartNode"]) || array_key_exists("navStartNode", $context) ? $context["navStartNode"] : (function () { throw new RuntimeError('Variable "navStartNode" does not exist.', 8, $this->source); })()), "\\Pimcore\\Model\\Document\\Page"))) {
// line 9
echo "\t";
$context["navStartNode"] = Pimcore\Model\Document::getById(1);
}
// line 11
echo "
";
// line 12
$context["mainNavigation"] = $this->extensions['App\Twig\Extension\NavigationExtension']->getCustomNavigation($this->sandbox->ensureToStringAllowed((isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 12, $this->source); })()), 12, $this->source), $this->sandbox->ensureToStringAllowed((isset($context["navStartNode"]) || array_key_exists("navStartNode", $context) ? $context["navStartNode"] : (function () { throw new RuntimeError('Variable "navStartNode" does not exist.', 12, $this->source); })()), 12, $this->source));
// line 13
$context["home"] = (isset($context["navStartNode"]) || array_key_exists("navStartNode", $context) ? $context["navStartNode"] : (function () { throw new RuntimeError('Variable "navStartNode" does not exist.', 13, $this->source); })());
// line 14
$context["menuRenderer"] = $this->env->getFunction('pimcore_nav_renderer')->getCallable()("menu");
// line 15
ob_start();
// line 16
echo "\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["mainNavigation"]) || array_key_exists("mainNavigation", $context) ? $context["mainNavigation"] : (function () { throw new RuntimeError('Variable "mainNavigation" does not exist.', 16, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
// line 17
echo "\t\t";
// line 18
echo "\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["page"], "isVisible", [], "method", false, false, true, 18) && twig_get_attribute($this->env, $this->source, (isset($context["menuRenderer"]) || array_key_exists("menuRenderer", $context) ? $context["menuRenderer"] : (function () { throw new RuntimeError('Variable "menuRenderer" does not exist.', 18, $this->source); })()), "accept", [0 => $context["page"]], "method", false, false, true, 18))) {
// line 19
echo "
\t\t\t";
// line 21
$context["activeClassItem"] = ((twig_get_attribute($this->env, $this->source, $context["page"], "getActive", [0 => true], "method", false, false, true, 21)) ? ("navigation__item--active") : (""));
// line 22
echo "\t\t\t<li class=\"navigation__item navigation__item--first ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["activeClassItem"]) || array_key_exists("activeClassItem", $context) ? $context["activeClassItem"] : (function () { throw new RuntimeError('Variable "activeClassItem" does not exist.', 22, $this->source); })()), 22, $this->source), "html", null, true);
echo " \">
\t\t\t\t";
// line 23
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, true, 23) == 0)) {
// line 24
echo "\t\t\t\t\t<div aria-hidden=\"true\">
\t\t\t\t\t";
// line 25
echo $this->extensions['App\Twig\Extension\SvgExtension']->getInline("ornament-7-double");
echo "
\t\t\t\t\t</div>
\t\t\t\t";
}
// line 28
echo "\t\t\t\t";
$this->loadTemplate("navigation/partials/footer-link.html.twig", "navigation/footer.html.twig", 28)->display(twig_array_merge($context, ["page" => $context["page"], "classes" => [0 => "navigation__link--first"]]));
// line 29
echo "\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $context["page"], "hasVisiblePages", [], "method", false, false, true, 29)) {
// line 30
echo "\t\t\t\t\t";
$context["children"] = twig_get_attribute($this->env, $this->source, $context["page"], "getPages", [], "method", false, false, true, 30);
// line 31
echo "\t\t\t\t\t<ul class=\"navigation__container navigation__container--second\">
\t\t\t\t\t\t";
// line 32
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["children"]) || array_key_exists("children", $context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.', 32, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["childPage"]) {
// line 33
echo "\t\t\t\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["childPage"], "isVisible", [], "method", false, false, true, 33) && twig_get_attribute($this->env, $this->source, (isset($context["menuRenderer"]) || array_key_exists("menuRenderer", $context) ? $context["menuRenderer"] : (function () { throw new RuntimeError('Variable "menuRenderer" does not exist.', 33, $this->source); })()), "accept", [0 => $context["childPage"]], "method", false, false, true, 33))) {
// line 34
echo "\t\t\t\t\t\t\t\t";
$context["activeClassChildItem"] = ((twig_get_attribute($this->env, $this->source, $context["childPage"], "getActive", [0 => true], "method", false, false, true, 34)) ? ("navigation__item--active") : (""));
// line 35
echo "\t\t\t\t\t\t\t\t<li class=\"navigation__item navigation__item--second ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["activeClassChildItem"]) || array_key_exists("activeClassChildItem", $context) ? $context["activeClassChildItem"] : (function () { throw new RuntimeError('Variable "activeClassChildItem" does not exist.', 35, $this->source); })()), 35, $this->source), "html", null, true);
echo " \">
\t\t\t\t\t\t\t\t\t";
// line 36
$this->loadTemplate("navigation/partials/footer-link.html.twig", "navigation/footer.html.twig", 36)->display(twig_array_merge($context, ["page" => $context["childPage"], "classes" => [0 => "navigation__link--second"]]));
// line 37
echo "\t\t\t\t\t\t\t\t</li>
\t\t\t\t\t\t\t";
}
// line 39
echo "\t\t\t\t\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['childPage'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 40
echo "\t\t\t\t\t</ul>
\t\t\t\t";
}
// line 42
echo "\t\t\t</li>
\t\t";
}
// line 44
echo "\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['page'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
$context["content"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 46
echo "
<nav class=\"navigation navigation--footer\" aria-label=\"";
// line 47
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("wcag.label.navigation-footer"), "html", null, true);
echo "\">
\t<ul class=\"navigation__container navigation__container--first\">
\t\t";
// line 50
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 50, $this->source); })()), 50, $this->source), "html", null, true);
echo "
\t</ul>
</nav>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "navigation/footer.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 204 => 50, 198 => 47, 195 => 46, 180 => 44, 176 => 42, 172 => 40, 158 => 39, 154 => 37, 152 => 36, 147 => 35, 144 => 34, 141 => 33, 124 => 32, 121 => 31, 118 => 30, 115 => 29, 112 => 28, 106 => 25, 103 => 24, 101 => 23, 96 => 22, 94 => 21, 90 => 19, 87 => 18, 85 => 17, 67 => 16, 65 => 15, 63 => 14, 61 => 13, 59 => 12, 56 => 11, 52 => 9, 50 => 8, 47 => 7, 45 => 6,);
}
public function getSourceContext()
{
return new Source("{#
project: Pimcore - Schutzverband Nuernberg Rostbratwuerste
User: erikb
Year: 2022
#}
{% set navStartNode = document.getProperty('navigation-root-primary') %}
{% if not navStartNode is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Link') and not navStartNode is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Page')%}
\t{% set navStartNode = pimcore_document(1) %}
{% endif %}
{% set mainNavigation = custom_build_nav(document, navStartNode) %}
{% set home = navStartNode %}
{% set menuRenderer = pimcore_nav_renderer('menu') %}
{% set content %}
\t{% for page in mainNavigation %}
\t\t{# here need to manually check for ACL conditions #}
\t\t{% if page.isVisible() and menuRenderer.accept(page) %}
\t\t\t{% set activeClassItem = page.getActive(true) ? 'navigation__item--active' : '' %}
\t\t\t<li class=\"navigation__item navigation__item--first {{ activeClassItem }} \">
\t\t\t\t{% if loop.index0 == 0 %}
\t\t\t\t\t<div aria-hidden=\"true\">
\t\t\t\t\t{{ get_svg_inline('ornament-7-double') }}
\t\t\t\t\t</div>
\t\t\t\t{% endif %}
\t\t\t\t{% include 'navigation/partials/footer-link.html.twig' with { page: page, classes: ['navigation__link--first'] } %}
\t\t\t\t{% if page.hasVisiblePages() %}
\t\t\t\t\t{% set children = page.getPages() %}
\t\t\t\t\t<ul class=\"navigation__container navigation__container--second\">
\t\t\t\t\t\t{% for childPage in children %}
\t\t\t\t\t\t\t{% if childPage.isVisible() and menuRenderer.accept(childPage) %}
\t\t\t\t\t\t\t\t{% set activeClassChildItem = childPage.getActive(true) ? 'navigation__item--active' : '' %}
\t\t\t\t\t\t\t\t<li class=\"navigation__item navigation__item--second {{ activeClassChildItem }} \">
\t\t\t\t\t\t\t\t\t{% include 'navigation/partials/footer-link.html.twig' with { page: childPage, classes: ['navigation__link--second'] } %}
\t\t\t\t\t\t\t\t</li>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t</ul>
\t\t\t\t{% endif %}
\t\t\t</li>
\t\t{% endif %}
\t{% endfor %}
{% endset %}
<nav class=\"navigation navigation--footer\" aria-label=\"{{ 'wcag.label.navigation-footer'|trans }}\">
\t<ul class=\"navigation__container navigation__container--first\">
\t\t{{ content }}
\t</ul>
</nav>", "navigation/footer.html.twig", "/var/www/snr/staging.nuernberger-bratwuerste.de/templates/navigation/footer.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 6, "if" => 8, "for" => 16, "include" => 28);
static $filters = array("escape" => 22, "trans" => 47);
static $functions = array("pimcore_document" => 9, "custom_build_nav" => 12, "pimcore_nav_renderer" => 14, "get_svg_inline" => 25);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for', 'include'],
['escape', 'trans'],
['pimcore_document', 'custom_build_nav', 'pimcore_nav_renderer', 'get_svg_inline']
);
} 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;
}
}
}