var/cache/dev/twig/94/941787b5103a68305a8f53fa165a5ae8.php line 35

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/breadcrumb.html.twig */
  14. class __TwigTemplate_a94f80d22b7e0ef1a176f60b0dc844e6 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/breadcrumb.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/breadcrumb.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["breadcrumbs"] = $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 14
  52.         twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_nav_renderer')->getCallable()("breadcrumbs"), "setPartial", [=> "navigation/partials/breadcrumbs.html.twig"], "method"falsefalsetrue14);
  53.         // line 15
  54.         echo "
  55. ";
  56.         // line 16
  57.         $context["menuRenderer"] = $this->env->getFunction('pimcore_nav_renderer')->getCallable()("menu");
  58.         // line 17
  59.         echo "
  60. <div class=\"section section--breadcrumb\">
  61. \t<nav class=\"navigation navigation--";
  62.         // line 19
  63.         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.'19$this->source); })()), 19$this->source), "breadcrumb")) : ("breadcrumb")), "html"nulltrue);
  64.         echo "\" aria-label=\"";
  65.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("wcag.label.navigation-meta"), "html"nulltrue);
  66.         echo "\">
  67. \t\t<a href=\"/";
  68.         // line 20
  69.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(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.'20$this->source); })()), "getProperty", [=> "language"], "method"falsefalsetrue20), 20$this->source), "html"nulltrue);
  70.         echo "\" class=\"navigation__link\">";
  71.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("breadcrumb.home"), "html"nulltrue);
  72.         echo "</a>
  73. \t\t";
  74.         // line 21
  75.         echo $this->env->getFunction('pimcore_render_nav')->getCallable()($this->sandbox->ensureToStringAllowed((isset($context["breadcrumbs"]) || array_key_exists("breadcrumbs"$context) ? $context["breadcrumbs"] : (function () { throw new RuntimeError('Variable "breadcrumbs" does not exist.'21$this->source); })()), 21$this->source), "breadcrumbs");
  76.         echo "
  77. \t</nav>
  78. </div>";
  79.         
  80.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  81.         
  82.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  83.     }
  84.     public function getTemplateName()
  85.     {
  86.         return "navigation/breadcrumb.html.twig";
  87.     }
  88.     public function isTraitable()
  89.     {
  90.         return false;
  91.     }
  92.     public function getDebugInfo()
  93.     {
  94.         return array (  84 => 21,  78 => 20,  72 => 19,  68 => 17,  66 => 16,  63 => 15,  61 => 14,  59 => 12,  56 => 11,  52 => 9,  50 => 8,  47 => 7,  45 => 6,);
  95.     }
  96.     public function getSourceContext()
  97.     {
  98.         return new Source("{#
  99. project: Pimcore - Schutzverband Nuernberg Rostbratwuerste
  100. User: erikb
  101. Year: 2022
  102. #}
  103. {% set navStartNode = document.getProperty('navigation-root-primary') %}
  104. {% if not navStartNode is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Link') and not navStartNode is  instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Page')%}
  105. \t{% set navStartNode = pimcore_document(1) %}
  106. {% endif %}
  107. {% set breadcrumbs = custom_build_nav(document, navStartNode) %}
  108. {# do pimcore_nav_renderer('breadcrumbs').setMinDepth(null).setSeparator('').setLinkLast(true) #}
  109. {% do pimcore_nav_renderer('breadcrumbs').setPartial('navigation/partials/breadcrumbs.html.twig') %}
  110. {% set menuRenderer = pimcore_nav_renderer('menu') %}
  111. <div class=\"section section--breadcrumb\">
  112. \t<nav class=\"navigation navigation--{{ class|default('breadcrumb') }}\" aria-label=\"{{ 'wcag.label.navigation-meta'|trans }}\">
  113. \t\t<a href=\"/{{ document.getProperty('language') }}\" class=\"navigation__link\">{{ 'breadcrumb.home'|trans }}</a>
  114. \t\t{{ pimcore_render_nav(breadcrumbs, 'breadcrumbs') }}
  115. \t</nav>
  116. </div>""navigation/breadcrumb.html.twig""/var/www/snr/staging.nuernberger-bratwuerste.de/templates/navigation/breadcrumb.html.twig");
  117.     }
  118.     
  119.     public function checkSecurity()
  120.     {
  121.         static $tags = array("set" => 6"if" => 8"do" => 14);
  122.         static $filters = array("escape" => 19"default" => 19"trans" => 19);
  123.         static $functions = array("pimcore_document" => 9"custom_build_nav" => 12"pimcore_nav_renderer" => 14"pimcore_render_nav" => 21);
  124.         try {
  125.             $this->sandbox->checkSecurity(
  126.                 ['set''if''do'],
  127.                 ['escape''default''trans'],
  128.                 ['pimcore_document''custom_build_nav''pimcore_nav_renderer''pimcore_render_nav']
  129.             );
  130.         } catch (SecurityError $e) {
  131.             $e->setSourceContext($this->source);
  132.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  133.                 $e->setTemplateLine($tags[$e->getTagName()]);
  134.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  135.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  136.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  137.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  138.             }
  139.             throw $e;
  140.         }
  141.     }
  142. }