<?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/breadcrumb.html.twig */
class __TwigTemplate_a94f80d22b7e0ef1a176f60b0dc844e6 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/breadcrumb.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/breadcrumb.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["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));
// line 14
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_nav_renderer')->getCallable()("breadcrumbs"), "setPartial", [0 => "navigation/partials/breadcrumbs.html.twig"], "method", false, false, true, 14);
// line 15
echo "
";
// line 16
$context["menuRenderer"] = $this->env->getFunction('pimcore_nav_renderer')->getCallable()("menu");
// line 17
echo "
<div class=\"section section--breadcrumb\">
\t<nav class=\"navigation navigation--";
// line 19
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", null, true);
echo "\" aria-label=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("wcag.label.navigation-meta"), "html", null, true);
echo "\">
\t\t<a href=\"/";
// line 20
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", [0 => "language"], "method", false, false, true, 20), 20, $this->source), "html", null, true);
echo "\" class=\"navigation__link\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("breadcrumb.home"), "html", null, true);
echo "</a>
\t\t";
// line 21
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");
echo "
\t</nav>
</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "navigation/breadcrumb.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
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 breadcrumbs = custom_build_nav(document, navStartNode) %}
{# do pimcore_nav_renderer('breadcrumbs').setMinDepth(null).setSeparator('').setLinkLast(true) #}
{% do pimcore_nav_renderer('breadcrumbs').setPartial('navigation/partials/breadcrumbs.html.twig') %}
{% set menuRenderer = pimcore_nav_renderer('menu') %}
<div class=\"section section--breadcrumb\">
\t<nav class=\"navigation navigation--{{ class|default('breadcrumb') }}\" aria-label=\"{{ 'wcag.label.navigation-meta'|trans }}\">
\t\t<a href=\"/{{ document.getProperty('language') }}\" class=\"navigation__link\">{{ 'breadcrumb.home'|trans }}</a>
\t\t{{ pimcore_render_nav(breadcrumbs, 'breadcrumbs') }}
\t</nav>
</div>", "navigation/breadcrumb.html.twig", "/var/www/snr/staging.nuernberger-bratwuerste.de/templates/navigation/breadcrumb.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 6, "if" => 8, "do" => 14);
static $filters = array("escape" => 19, "default" => 19, "trans" => 19);
static $functions = array("pimcore_document" => 9, "custom_build_nav" => 12, "pimcore_nav_renderer" => 14, "pimcore_render_nav" => 21);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'do'],
['escape', 'default', 'trans'],
['pimcore_document', 'custom_build_nav', 'pimcore_nav_renderer', 'pimcore_render_nav']
);
} 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;
}
}
}