var/cache/dev/twig/64/645f721148a9c1cb67aae6c4aba0dab4.php line 59

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. /* navigation/footer.html.twig */
  14. class __TwigTemplate_e1b3be241c980e878f8904be0b3cc6b7 extends 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.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""navigation/footer.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""navigation/footer.html.twig"));
  35.         // line 6
  36.         $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", [=> "navigation-root-primary"], "method"falsefalsetrue6);
  37.         // line 7
  38.         echo "
  39. ";
  40.         // line 8
  41.         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"))) {
  42.             // line 9
  43.             echo "\t";
  44.             $context["navStartNode"] = Pimcore\Model\Document::getById(1);
  45.         }
  46.         // line 11
  47.         echo "
  48. ";
  49.         // line 12
  50.         $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));
  51.         // line 13
  52.         $context["home"] = (isset($context["navStartNode"]) || array_key_exists("navStartNode"$context) ? $context["navStartNode"] : (function () { throw new RuntimeError('Variable "navStartNode" does not exist.'13$this->source); })());
  53.         // line 14
  54.         $context["menuRenderer"] = $this->env->getFunction('pimcore_nav_renderer')->getCallable()("menu");
  55.         // line 15
  56.         ob_start();
  57.         // line 16
  58.         echo "\t";
  59.         $context['_parent'] = $context;
  60.         $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); })()));
  61.         $context['loop'] = [
  62.           'parent' => $context['_parent'],
  63.           'index0' => 0,
  64.           'index'  => 1,
  65.           'first'  => true,
  66.         ];
  67.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  68.             $length count($context['_seq']);
  69.             $context['loop']['revindex0'] = $length 1;
  70.             $context['loop']['revindex'] = $length;
  71.             $context['loop']['length'] = $length;
  72.             $context['loop']['last'] = === $length;
  73.         }
  74.         foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
  75.             // line 17
  76.             echo "\t\t";
  77.             // line 18
  78.             echo "\t\t";
  79.             if ((twig_get_attribute($this->env$this->source$context["page"], "isVisible", [], "method"falsefalsetrue18) && 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", [=> $context["page"]], "method"falsefalsetrue18))) {
  80.                 // line 19
  81.                 echo "
  82. \t\t\t";
  83.                 // line 21
  84.                 $context["activeClassItem"] = ((twig_get_attribute($this->env$this->source$context["page"], "getActive", [=> true], "method"falsefalsetrue21)) ? ("navigation__item--active") : (""));
  85.                 // line 22
  86.                 echo "\t\t\t<li class=\"navigation__item navigation__item--first ";
  87.                 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"nulltrue);
  88.                 echo " \">
  89. \t\t\t\t";
  90.                 // line 23
  91.                 if ((twig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsetrue23) == 0)) {
  92.                     // line 24
  93.                     echo "\t\t\t\t\t<div aria-hidden=\"true\">
  94. \t\t\t\t\t";
  95.                     // line 25
  96.                     echo $this->extensions['App\Twig\Extension\SvgExtension']->getInline("ornament-7-double");
  97.                     echo "
  98. \t\t\t\t\t</div>
  99. \t\t\t\t";
  100.                 }
  101.                 // line 28
  102.                 echo "\t\t\t\t";
  103.                 $this->loadTemplate("navigation/partials/footer-link.html.twig""navigation/footer.html.twig"28)->display(twig_array_merge($context, ["page" => $context["page"], "classes" => [=> "navigation__link--first"]]));
  104.                 // line 29
  105.                 echo "\t\t\t\t";
  106.                 if (twig_get_attribute($this->env$this->source$context["page"], "hasVisiblePages", [], "method"falsefalsetrue29)) {
  107.                     // line 30
  108.                     echo "\t\t\t\t\t";
  109.                     $context["children"] = twig_get_attribute($this->env$this->source$context["page"], "getPages", [], "method"falsefalsetrue30);
  110.                     // line 31
  111.                     echo "\t\t\t\t\t<ul class=\"navigation__container navigation__container--second\">
  112. \t\t\t\t\t\t";
  113.                     // line 32
  114.                     $context['_parent'] = $context;
  115.                     $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); })()));
  116.                     $context['loop'] = [
  117.                       'parent' => $context['_parent'],
  118.                       'index0' => 0,
  119.                       'index'  => 1,
  120.                       'first'  => true,
  121.                     ];
  122.                     if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  123.                         $length count($context['_seq']);
  124.                         $context['loop']['revindex0'] = $length 1;
  125.                         $context['loop']['revindex'] = $length;
  126.                         $context['loop']['length'] = $length;
  127.                         $context['loop']['last'] = === $length;
  128.                     }
  129.                     foreach ($context['_seq'] as $context["_key"] => $context["childPage"]) {
  130.                         // line 33
  131.                         echo "\t\t\t\t\t\t\t";
  132.                         if ((twig_get_attribute($this->env$this->source$context["childPage"], "isVisible", [], "method"falsefalsetrue33) && 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", [=> $context["childPage"]], "method"falsefalsetrue33))) {
  133.                             // line 34
  134.                             echo "\t\t\t\t\t\t\t\t";
  135.                             $context["activeClassChildItem"] = ((twig_get_attribute($this->env$this->source$context["childPage"], "getActive", [=> true], "method"falsefalsetrue34)) ? ("navigation__item--active") : (""));
  136.                             // line 35
  137.                             echo "\t\t\t\t\t\t\t\t<li class=\"navigation__item navigation__item--second ";
  138.                             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"nulltrue);
  139.                             echo " \">
  140. \t\t\t\t\t\t\t\t\t";
  141.                             // line 36
  142.                             $this->loadTemplate("navigation/partials/footer-link.html.twig""navigation/footer.html.twig"36)->display(twig_array_merge($context, ["page" => $context["childPage"], "classes" => [=> "navigation__link--second"]]));
  143.                             // line 37
  144.                             echo "\t\t\t\t\t\t\t\t</li>
  145. \t\t\t\t\t\t\t";
  146.                         }
  147.                         // line 39
  148.                         echo "\t\t\t\t\t\t";
  149.                         ++$context['loop']['index0'];
  150.                         ++$context['loop']['index'];
  151.                         $context['loop']['first'] = false;
  152.                         if (isset($context['loop']['length'])) {
  153.                             --$context['loop']['revindex0'];
  154.                             --$context['loop']['revindex'];
  155.                             $context['loop']['last'] = === $context['loop']['revindex0'];
  156.                         }
  157.                     }
  158.                     $_parent $context['_parent'];
  159.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['childPage'], $context['_parent'], $context['loop']);
  160.                     $context array_intersect_key($context$_parent) + $_parent;
  161.                     // line 40
  162.                     echo "\t\t\t\t\t</ul>
  163. \t\t\t\t";
  164.                 }
  165.                 // line 42
  166.                 echo "\t\t\t</li>
  167. \t\t";
  168.             }
  169.             // line 44
  170.             echo "\t";
  171.             ++$context['loop']['index0'];
  172.             ++$context['loop']['index'];
  173.             $context['loop']['first'] = false;
  174.             if (isset($context['loop']['length'])) {
  175.                 --$context['loop']['revindex0'];
  176.                 --$context['loop']['revindex'];
  177.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  178.             }
  179.         }
  180.         $_parent $context['_parent'];
  181.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['page'], $context['_parent'], $context['loop']);
  182.         $context array_intersect_key($context$_parent) + $_parent;
  183.         $context["content"] = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  184.         // line 46
  185.         echo "
  186. <nav class=\"navigation navigation--footer\" aria-label=\"";
  187.         // line 47
  188.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("wcag.label.navigation-footer"), "html"nulltrue);
  189.         echo "\">
  190. \t<ul class=\"navigation__container navigation__container--first\">
  191. \t\t";
  192.         // line 50
  193.         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"nulltrue);
  194.         echo "
  195. \t</ul>
  196. </nav>";
  197.         
  198.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  199.         
  200.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  201.     }
  202.     public function getTemplateName()
  203.     {
  204.         return "navigation/footer.html.twig";
  205.     }
  206.     public function isTraitable()
  207.     {
  208.         return false;
  209.     }
  210.     public function getDebugInfo()
  211.     {
  212.         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,);
  213.     }
  214.     public function getSourceContext()
  215.     {
  216.         return new Source("{#
  217. project: Pimcore - Schutzverband Nuernberg Rostbratwuerste
  218. User: erikb
  219. Year: 2022
  220. #}
  221. {% set navStartNode = document.getProperty('navigation-root-primary') %}
  222. {% if not navStartNode is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Link') and not navStartNode is  instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Page')%}
  223. \t{% set navStartNode = pimcore_document(1) %}
  224. {% endif %}
  225. {% set mainNavigation = custom_build_nav(document, navStartNode) %}
  226. {% set home = navStartNode %}
  227. {% set menuRenderer = pimcore_nav_renderer('menu') %}
  228. {% set content %}
  229. \t{% for page in mainNavigation %}
  230. \t\t{# here need to manually check for ACL conditions #}
  231. \t\t{% if page.isVisible() and menuRenderer.accept(page) %}
  232. \t\t\t{% set activeClassItem = page.getActive(true) ? 'navigation__item--active' : '' %}
  233. \t\t\t<li class=\"navigation__item navigation__item--first {{ activeClassItem }} \">
  234. \t\t\t\t{% if loop.index0 == 0 %}
  235. \t\t\t\t\t<div aria-hidden=\"true\">
  236. \t\t\t\t\t{{ get_svg_inline('ornament-7-double') }}
  237. \t\t\t\t\t</div>
  238. \t\t\t\t{% endif %}
  239. \t\t\t\t{% include 'navigation/partials/footer-link.html.twig' with { page: page, classes: ['navigation__link--first'] } %}
  240. \t\t\t\t{% if page.hasVisiblePages() %}
  241. \t\t\t\t\t{% set children = page.getPages() %}
  242. \t\t\t\t\t<ul class=\"navigation__container navigation__container--second\">
  243. \t\t\t\t\t\t{% for childPage in children %}
  244. \t\t\t\t\t\t\t{% if childPage.isVisible() and menuRenderer.accept(childPage) %}
  245. \t\t\t\t\t\t\t\t{% set activeClassChildItem = childPage.getActive(true) ? 'navigation__item--active' : '' %}
  246. \t\t\t\t\t\t\t\t<li class=\"navigation__item navigation__item--second {{ activeClassChildItem }} \">
  247. \t\t\t\t\t\t\t\t\t{% include 'navigation/partials/footer-link.html.twig' with { page: childPage, classes: ['navigation__link--second'] } %}
  248. \t\t\t\t\t\t\t\t</li>
  249. \t\t\t\t\t\t\t{% endif %}
  250. \t\t\t\t\t\t{% endfor %}
  251. \t\t\t\t\t</ul>
  252. \t\t\t\t{% endif %}
  253. \t\t\t</li>
  254. \t\t{% endif %}
  255. \t{% endfor %}
  256. {% endset %}
  257. <nav class=\"navigation navigation--footer\" aria-label=\"{{ 'wcag.label.navigation-footer'|trans }}\">
  258. \t<ul class=\"navigation__container navigation__container--first\">
  259. \t\t{{ content }}
  260. \t</ul>
  261. </nav>""navigation/footer.html.twig""/var/www/snr/staging.nuernberger-bratwuerste.de/templates/navigation/footer.html.twig");
  262.     }
  263.     
  264.     public function checkSecurity()
  265.     {
  266.         static $tags = array("set" => 6"if" => 8"for" => 16"include" => 28);
  267.         static $filters = array("escape" => 22"trans" => 47);
  268.         static $functions = array("pimcore_document" => 9"custom_build_nav" => 12"pimcore_nav_renderer" => 14"get_svg_inline" => 25);
  269.         try {
  270.             $this->sandbox->checkSecurity(
  271.                 ['set''if''for''include'],
  272.                 ['escape''trans'],
  273.                 ['pimcore_document''custom_build_nav''pimcore_nav_renderer''get_svg_inline']
  274.             );
  275.         } catch (SecurityError $e) {
  276.             $e->setSourceContext($this->source);
  277.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  278.                 $e->setTemplateLine($tags[$e->getTagName()]);
  279.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  280.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  281.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  282.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  283.             }
  284.             throw $e;
  285.         }
  286.     }
  287. }