var/cache/dev/twig/7f/7f468b1f6430ae02d0ac81bd444c1456.php line 40

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* includes/top-header.html.twig */
  16. class __TwigTemplate_27ccf35f29e9d765d62c8c3c2ba6d7dc extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->parent = false;
  28. $this->blocks = [
  29. ];
  30. $this->sandbox = $this->extensions[SandboxExtension::class];
  31. $this->checkSecurity();
  32. }
  33. protected function doDisplay(array $context, array $blocks = []): iterable
  34. {
  35. $macros = $this->macros;
  36. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/top-header.html.twig"));
  38. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/top-header.html.twig"));
  40. // line 1
  41. $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);
  42. // line 2
  43. $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)]);
  44. // line 3
  45. $context["serviceMenuRenderer"] = $this->env->getFunction('pimcore_nav_renderer')->getCallable()("menu");
  46. // line 4
  47. yield "
  48. <div class=\"top-header\">
  49. <ul class=\"service-nav flex flex-end\">
  50. ";
  51. // line 7
  52. $context['_parent'] = $context;
  53. $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); })()));
  54. foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
  55. // line 8
  56. yield " ";
  57. 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))) {
  58. // line 9
  59. yield " ";
  60. $context["activeClass"] = ((CoreExtension::getAttribute($this->env, $this->source, $context["page"], "getActive", [true], "method", false, false, true, 9)) ? ("active") : (""));
  61. // line 10
  62. yield " ";
  63. if (CoreExtension::getAttribute($this->env, $this->source, $context["page"], "target", [], "any", false, false, true, 10)) {
  64. // line 11
  65. yield " ";
  66. $context["target"] = CoreExtension::getAttribute($this->env, $this->source, $context["page"], "target", [], "any", false, false, true, 11);
  67. // line 12
  68. yield " ";
  69. } else {
  70. // line 13
  71. yield " ";
  72. $context["target"] = "_self";
  73. // line 14
  74. yield " ";
  75. }
  76. // line 15
  77. yield " <li>
  78. <a class=\"";
  79. // line 16
  80. 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);
  81. yield "\" href=\"";
  82. 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);
  83. yield "\" target=\"";
  84. 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);
  85. yield "\" title=\"";
  86. 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);
  87. yield "\">";
  88. 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);
  89. yield "</a>
  90. </li>
  91. ";
  92. }
  93. // line 19
  94. yield " ";
  95. }
  96. $_parent = $context['_parent'];
  97. unset($context['_seq'], $context['_key'], $context['page'], $context['_parent']);
  98. $context = array_intersect_key($context, $_parent) + $_parent;
  99. // line 20
  100. yield "
  101. ";
  102. // line 35
  103. yield " </ul>
  104. </div>";
  105. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  106. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  107. yield from [];
  108. }
  109. /**
  110. * @codeCoverageIgnore
  111. */
  112. public function getTemplateName(): string
  113. {
  114. return "includes/top-header.html.twig";
  115. }
  116. /**
  117. * @codeCoverageIgnore
  118. */
  119. public function isTraitable(): bool
  120. {
  121. return false;
  122. }
  123. /**
  124. * @codeCoverageIgnore
  125. */
  126. public function getDebugInfo(): array
  127. {
  128. 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,);
  129. }
  130. public function getSourceContext(): Source
  131. {
  132. return new Source("{% set ServiceNavStartNode = document.getProperty('service_navigation_root') %}
  133. {% set serviceNavigation = pimcore_build_nav({active: document, root: ServiceNavStartNode}) %}
  134. {% set serviceMenuRenderer = pimcore_nav_renderer('menu') %}
  135. <div class=\"top-header\">
  136. <ul class=\"service-nav flex flex-end\">
  137. {% for page in serviceNavigation %}
  138. {% if (page.isVisible and serviceMenuRenderer.accept(page)) %}
  139. {% set activeClass = page.getActive(true) ? 'active' : '' %}
  140. {% if page.target %}
  141. {% set target = page.target %}
  142. {% else %}
  143. {% set target = '_self' %}
  144. {% endif %}
  145. <li>
  146. <a class=\"{{ activeClass }}\" href=\"{{ page.href }}\" target=\"{{ target }}\" title=\"{{ page.label }}\">{{ page.label }}</a>
  147. </li>
  148. {% endif %}
  149. {% endfor %}
  150. {# {% if deviceType != \"phone\" %}
  151. <li>
  152. <div class=\"desktop-search\">
  153. <form class=\"search-form flex\" id=\"navigation-search-form\" action=\"{{ document.getProperty('search') }}\" name=\"q\" novalidate=\"\">
  154. <input class=\"search-input\" id=\"navigation-search-input-desktop\" type=\"text\" name=\"q\" value=\"\" placeholder=\"{{ 'Suche' | trans }}...\" required=\"\">
  155. <button title=\"Suche\" type=\"submit\" id=\"search-submit-desktop\">
  156. <svg width=\"20\" height=\"20.005\" viewBox=\"0 0 20 20.005\">
  157. <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\"/>
  158. </svg>
  159. </button>
  160. </form>
  161. </div>
  162. </li>
  163. {% endif %} #}
  164. </ul>
  165. </div>", "includes/top-header.html.twig", "/home/httpd/vhosts/annavation.a4interactive.ch/httpdocs/dev/templates/includes/top-header.html.twig");
  166. }
  167. public function checkSecurity()
  168. {
  169. static $tags = ["set" => 1, "for" => 7, "if" => 8];
  170. static $filters = ["escape" => 16];
  171. static $functions = ["pimcore_build_nav" => 2, "pimcore_nav_renderer" => 3];
  172. try {
  173. $this->sandbox->checkSecurity(
  174. ['set', 'for', 'if'],
  175. ['escape'],
  176. ['pimcore_build_nav', 'pimcore_nav_renderer'],
  177. $this->source
  178. );
  179. } catch (SecurityError $e) {
  180. $e->setSourceContext($this->source);
  181. if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  182. $e->setTemplateLine($tags[$e->getTagName()]);
  183. } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  184. $e->setTemplateLine($filters[$e->getFilterName()]);
  185. } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  186. $e->setTemplateLine($functions[$e->getFunctionName()]);
  187. }
  188. throw $e;
  189. }
  190. }
  191. }