<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* includes/top-header.html.twig */
class __TwigTemplate_27ccf35f29e9d765d62c8c3c2ba6d7dc extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "includes/top-header.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/top-header.html.twig"));
// line 1
$context["ServiceNavStartNode"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 1, $this->source); })()), "getProperty", ["service_navigation_root"], "method", false, false, true, 1);
// line 2
$context["serviceNavigation"] = $this->env->getFunction('pimcore_build_nav')->getCallable()(["active" => $this->sandbox->ensureToStringAllowed((isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 2, $this->source); })()), 2, $this->source), "root" => $this->sandbox->ensureToStringAllowed((isset($context["ServiceNavStartNode"]) || array_key_exists("ServiceNavStartNode", $context) ? $context["ServiceNavStartNode"] : (function () { throw new RuntimeError('Variable "ServiceNavStartNode" does not exist.', 2, $this->source); })()), 2, $this->source)]);
// line 3
$context["serviceMenuRenderer"] = $this->env->getFunction('pimcore_nav_renderer')->getCallable()("menu");
// line 4
yield "
<div class=\"top-header\">
<ul class=\"service-nav flex flex-end\">
";
// line 7
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["serviceNavigation"]) || array_key_exists("serviceNavigation", $context) ? $context["serviceNavigation"] : (function () { throw new RuntimeError('Variable "serviceNavigation" does not exist.', 7, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
// line 8
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["page"], "isVisible", [], "any", false, false, true, 8) && CoreExtension::getAttribute($this->env, $this->source, (isset($context["serviceMenuRenderer"]) || array_key_exists("serviceMenuRenderer", $context) ? $context["serviceMenuRenderer"] : (function () { throw new RuntimeError('Variable "serviceMenuRenderer" does not exist.', 8, $this->source); })()), "accept", [$context["page"]], "method", false, false, true, 8))) {
// line 9
yield " ";
$context["activeClass"] = ((CoreExtension::getAttribute($this->env, $this->source, $context["page"], "getActive", [true], "method", false, false, true, 9)) ? ("active") : (""));
// line 10
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, $context["page"], "target", [], "any", false, false, true, 10)) {
// line 11
yield " ";
$context["target"] = CoreExtension::getAttribute($this->env, $this->source, $context["page"], "target", [], "any", false, false, true, 11);
// line 12
yield " ";
} else {
// line 13
yield " ";
$context["target"] = "_self";
// line 14
yield " ";
}
// line 15
yield " <li>
<a class=\"";
// line 16
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["activeClass"]) || array_key_exists("activeClass", $context) ? $context["activeClass"] : (function () { throw new RuntimeError('Variable "activeClass" does not exist.', 16, $this->source); })()), 16, $this->source), "html", null, true);
yield "\" href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["page"], "href", [], "any", false, false, true, 16), 16, $this->source), "html", null, true);
yield "\" target=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["target"]) || array_key_exists("target", $context) ? $context["target"] : (function () { throw new RuntimeError('Variable "target" does not exist.', 16, $this->source); })()), 16, $this->source), "html", null, true);
yield "\" title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["page"], "label", [], "any", false, false, true, 16), 16, $this->source), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["page"], "label", [], "any", false, false, true, 16), 16, $this->source), "html", null, true);
yield "</a>
</li>
";
}
// line 19
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['page'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 20
yield "
";
// line 35
yield " </ul>
</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "includes/top-header.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 112 => 35, 109 => 20, 103 => 19, 89 => 16, 86 => 15, 83 => 14, 80 => 13, 77 => 12, 74 => 11, 71 => 10, 68 => 9, 65 => 8, 61 => 7, 56 => 4, 54 => 3, 52 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set ServiceNavStartNode = document.getProperty('service_navigation_root') %}
{% set serviceNavigation = pimcore_build_nav({active: document, root: ServiceNavStartNode}) %}
{% set serviceMenuRenderer = pimcore_nav_renderer('menu') %}
<div class=\"top-header\">
<ul class=\"service-nav flex flex-end\">
{% for page in serviceNavigation %}
{% if (page.isVisible and serviceMenuRenderer.accept(page)) %}
{% set activeClass = page.getActive(true) ? 'active' : '' %}
{% if page.target %}
{% set target = page.target %}
{% else %}
{% set target = '_self' %}
{% endif %}
<li>
<a class=\"{{ activeClass }}\" href=\"{{ page.href }}\" target=\"{{ target }}\" title=\"{{ page.label }}\">{{ page.label }}</a>
</li>
{% endif %}
{% endfor %}
{# {% if deviceType != \"phone\" %}
<li>
<div class=\"desktop-search\">
<form class=\"search-form flex\" id=\"navigation-search-form\" action=\"{{ document.getProperty('search') }}\" name=\"q\" novalidate=\"\">
<input class=\"search-input\" id=\"navigation-search-input-desktop\" type=\"text\" name=\"q\" value=\"\" placeholder=\"{{ 'Suche' | trans }}...\" required=\"\">
<button title=\"Suche\" type=\"submit\" id=\"search-submit-desktop\">
<svg width=\"20\" height=\"20.005\" viewBox=\"0 0 20 20.005\">
<path d=\"M24.265,23.05,18.7,17.436a7.927,7.927,0,1,0-1.2,1.219l5.526,5.578a.856.856,0,0,0,1.208.031A.862.862,0,0,0,24.265,23.05ZM12.474,18.722A6.259,6.259,0,1,1,16.9,16.889,6.221,6.221,0,0,1,12.474,18.722Z\" transform=\"translate(-4.5 -4.493)\" fill=\"#dddad3\"/>
</svg>
</button>
</form>
</div>
</li>
{% endif %} #}
</ul>
</div>", "includes/top-header.html.twig", "/home/httpd/vhosts/annavation.a4interactive.ch/httpdocs/dev/templates/includes/top-header.html.twig");
}
public function checkSecurity()
{
static $tags = ["set" => 1, "for" => 7, "if" => 8];
static $filters = ["escape" => 16];
static $functions = ["pimcore_build_nav" => 2, "pimcore_nav_renderer" => 3];
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if'],
['escape'],
['pimcore_build_nav', 'pimcore_nav_renderer'],
$this->source
);
} 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;
}
}
}