var/cache/dev/twig/43/4377e035a8799b74d650b7702d4f7ed8.php line 63

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/meta.html.twig */
  14. class __TwigTemplate_3550af6c1bd814f102bf821d0c0b4663 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/meta.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/meta.html.twig"));
  35.         // line 6
  36.         echo "
  37. ";
  38.         // line 9
  39.         $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.'9$this->source); })()), "getProperty", [=> "navigation-root-meta"], "method"falsefalsetrue9);
  40.         // line 10
  41.         echo "
  42. ";
  43.         // line 11
  44.         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.'11$this->source); })()), "\\Pimcore\\Model\\Document\\Folder") &&  !$this->env->getTest('instanceof')->getCallable()((isset($context["navStartNode"]) || array_key_exists("navStartNode"$context) ? $context["navStartNode"] : (function () { throw new RuntimeError('Variable "navStartNode" does not exist.'11$this->source); })()), "\\Pimcore\\Model\\Document\\Page"))) {
  45.             // line 12
  46.             echo "\t";
  47.             $context["navStartNode"] = Pimcore\Model\Document::getById(1);
  48.         }
  49.         // line 14
  50.         echo "
  51. ";
  52.         // line 15
  53.         $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.'15$this->source); })()), 15$this->source), $this->sandbox->ensureToStringAllowed((isset($context["navStartNode"]) || array_key_exists("navStartNode"$context) ? $context["navStartNode"] : (function () { throw new RuntimeError('Variable "navStartNode" does not exist.'15$this->source); })()), 15$this->source));
  54.         // line 16
  55.         $context["menuRenderer"] = $this->env->getFunction('pimcore_nav_renderer')->getCallable()("menu");
  56.         // line 17
  57.         ob_start();
  58.         // line 18
  59.         echo "
  60. \t";
  61.         // line 19
  62.         $context['_parent'] = $context;
  63.         $context['_seq'] = twig_ensure_traversable((isset($context["mainNavigation"]) || array_key_exists("mainNavigation"$context) ? $context["mainNavigation"] : (function () { throw new RuntimeError('Variable "mainNavigation" does not exist.'19$this->source); })()));
  64.         foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
  65.             // line 20
  66.             echo "\t\t";
  67.             if (((twig_get_attribute($this->env$this->source$context["page"], "isVisible", [], "method"falsefalsetrue20) && 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.'20$this->source); })()), "accept", [=> $context["page"]], "method"falsefalsetrue20)) &&  !twig_get_attribute($this->env$this->source$context["page"], "getCustomSetting", [=> "navigationItemVirtual"], "method"falsefalsetrue20))) {
  68.                 // line 21
  69.                 echo "\t\t\t";
  70.                 $context["activeClass"] = ((twig_get_attribute($this->env$this->source$context["page"], "getActive", [=> true], "method"falsefalsetrue21)) ? ("navigation__item--active") : (""));
  71.                 // line 22
  72.                 echo "\t\t\t<li class=\"navigation__item ";
  73.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["activeClass"]) || array_key_exists("activeClass"$context) ? $context["activeClass"] : (function () { throw new RuntimeError('Variable "activeClass" does not exist.'22$this->source); })()), 22$this->source), "html"nulltrue);
  74.                 echo "\">
  75. \t\t\t\t<a href=\"";
  76.                 // line 23
  77.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["page"], "getHref", [], "method"falsefalsetrue23), 23$this->source), "html"nulltrue);
  78.                 echo "\"
  79. \t\t\t\t   class=\"navigation__link\"
  80. \t\t\t\t   target=\"";
  81.                 // line 25
  82.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["page"], "getTarget", [], "method"falsefalsetrue25), 25$this->source), "html"nulltrue);
  83.                 echo "\"
  84. \t\t\t\t   aria-label=\"";
  85.                 // line 26
  86.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["page"], "getLabel", [], "method"falsefalsetrue26), 26$this->source), "html"nulltrue);
  87.                 echo "\" ";
  88.                 if (twig_get_attribute($this->env$this->source$context["page"], "getActive", [=> false], "method"falsefalsetrue26)) {
  89.                     echo "aria-current=\"page\"";
  90.                 }
  91.                 echo ">
  92. \t\t\t\t\t";
  93.                 // line 27
  94.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["page"], "getLabel", [], "method"falsefalsetrue27), 27$this->source), "html"nulltrue);
  95.                 echo "
  96. \t\t\t\t</a>
  97. \t\t\t</li>
  98. \t\t";
  99.             }
  100.             // line 31
  101.             echo "\t";
  102.         }
  103.         $_parent $context['_parent'];
  104.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['page'], $context['_parent'], $context['loop']);
  105.         $context array_intersect_key($context$_parent) + $_parent;
  106.         $context["content"] = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  107.         // line 33
  108.         echo "
  109. <nav class=\"navigation navigation--";
  110.         // line 34
  111.         echo twig_escape_filter($this->env, ((array_key_exists("class"$context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["class"]) || array_key_exists("class"$context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.'34$this->source); })()), 34$this->source), "meta")) : ("meta")), "html"nulltrue);
  112.         echo "\" aria-label=\"";
  113.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("wcag.label.navigation-meta"), "html"nulltrue);
  114.         echo "\">
  115. \t<ul class=\"navigation__container\">
  116. \t\t";
  117.         // line 36
  118.         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.'36$this->source); })()), 36$this->source), "html"nulltrue);
  119.         echo "
  120. \t</ul>
  121. </nav>";
  122.         
  123.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  124.         
  125.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  126.     }
  127.     public function getTemplateName()
  128.     {
  129.         return "navigation/meta.html.twig";
  130.     }
  131.     public function isTraitable()
  132.     {
  133.         return false;
  134.     }
  135.     public function getDebugInfo()
  136.     {
  137.         return array (  128 => 36,  121 => 34,  118 => 33,  111 => 31,  104 => 27,  96 => 26,  92 => 25,  87 => 23,  82 => 22,  79 => 21,  76 => 20,  72 => 19,  69 => 18,  67 => 17,  65 => 16,  63 => 15,  60 => 14,  56 => 12,  54 => 11,  51 => 10,  49 => 9,  45 => 6,);
  138.     }
  139.     public function getSourceContext()
  140.     {
  141.         return new Source("{#
  142. project: Pimcore - Schutzverband Nuernberg Rostbratwuerste
  143. User: erikb
  144. Year: 2022
  145. #}
  146. {# get the document which should be used to start in navigation | default home #}
  147. {% set navStartNode = document.getProperty('navigation-root-meta') %}
  148. {% if not navStartNode is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Folder') and not navStartNode is  instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Page')%}
  149. \t{% set navStartNode = pimcore_document(1) %}
  150. {% endif %}
  151. {% set mainNavigation = custom_build_nav(document, navStartNode) %}
  152. {% set menuRenderer = pimcore_nav_renderer('menu') %}
  153. {% set content %}
  154. \t{% for page in mainNavigation %}
  155. \t\t{% if page.isVisible() and menuRenderer.accept(page) and not page.getCustomSetting('navigationItemVirtual')  %}
  156. \t\t\t{% set activeClass = page.getActive(true) ? 'navigation__item--active' : '' %}
  157. \t\t\t<li class=\"navigation__item {{ activeClass }}\">
  158. \t\t\t\t<a href=\"{{ page.getHref() }}\"
  159. \t\t\t\t   class=\"navigation__link\"
  160. \t\t\t\t   target=\"{{ page.getTarget() }}\"
  161. \t\t\t\t   aria-label=\"{{ page.getLabel() }}\" {% if page.getActive(false) %}aria-current=\"page\"{% endif %}>
  162. \t\t\t\t\t{{ page.getLabel() }}
  163. \t\t\t\t</a>
  164. \t\t\t</li>
  165. \t\t{% endif %}
  166. \t{% endfor %}
  167. {% endset %}
  168. <nav class=\"navigation navigation--{{ class|default('meta') }}\" aria-label=\"{{ 'wcag.label.navigation-meta'|trans }}\">
  169. \t<ul class=\"navigation__container\">
  170. \t\t{{ content }}
  171. \t</ul>
  172. </nav>""navigation/meta.html.twig""/var/www/snr/staging.nuernberger-bratwuerste.de/templates/navigation/meta.html.twig");
  173.     }
  174.     
  175.     public function checkSecurity()
  176.     {
  177.         static $tags = array("set" => 9"if" => 11"for" => 19);
  178.         static $filters = array("escape" => 22"default" => 34"trans" => 34);
  179.         static $functions = array("pimcore_document" => 12"custom_build_nav" => 15"pimcore_nav_renderer" => 16);
  180.         try {
  181.             $this->sandbox->checkSecurity(
  182.                 ['set''if''for'],
  183.                 ['escape''default''trans'],
  184.                 ['pimcore_document''custom_build_nav''pimcore_nav_renderer']
  185.             );
  186.         } catch (SecurityError $e) {
  187.             $e->setSourceContext($this->source);
  188.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  189.                 $e->setTemplateLine($tags[$e->getTagName()]);
  190.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  191.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  192.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  193.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  194.             }
  195.             throw $e;
  196.         }
  197.     }
  198. }