<?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;
/* knp_menu.html.twig */
class __TwigTemplate_803920045b3ee151afa20359cf3ae0d3 extends Netgen\Bundle\SiteBundle\Templating\Twig\DebugTemplate
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'compressed_root' => [$this, 'block_compressed_root'],
'root' => [$this, 'block_root'],
'list' => [$this, 'block_list'],
'children' => [$this, 'block_children'],
'item' => [$this, 'block_item'],
'linkElement' => [$this, 'block_linkElement'],
'spanElement' => [$this, 'block_spanElement'],
'label' => [$this, 'block_label'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "knp_menu_base.html.twig";
}
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", "knp_menu.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "knp_menu.html.twig"));
$this->parent = $this->load("knp_menu_base.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 11
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_compressed_root(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(), "block", "compressed_root"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "compressed_root"));
// line 12
$_v0 = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
// line 13
yield from $this->unwrap()->yieldBlock("root", $context, $blocks);
yield "
";
yield from [];
})())) ? '' : new Markup($tmp, $this->env->getCharset());
// line 12
yield Knp\Menu\Twig\MenuExtension::spaceless($_v0);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 17
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_root(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(), "block", "root"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "root"));
// line 18
$context["listAttributes"] = Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 18, $this->source); })()), "childrenAttributes", [], "any", false, false, false, 18);
// line 19
yield from $this->unwrap()->yieldBlock("list", $context, $blocks);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 22
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_list(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(), "block", "list"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "list"));
// line 23
if (((Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 23, $this->source); })()), "hasChildren", [], "any", false, false, false, 23) && !(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 23, $this->source); })()), "depth", [], "any", false, false, false, 23) === 0)) && Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 23, $this->source); })()), "displayChildren", [], "any", false, false, false, 23))) {
// line 24
yield " ";
$macros["knp_menu"] = $this;
// line 25
yield " <ul";
yield $macros["knp_menu"]->getTemplateForMacro("macro_attributes", $context, 25, $this->getSourceContext())->macro_attributes(...[(isset($context["listAttributes"]) || array_key_exists("listAttributes", $context) ? $context["listAttributes"] : (function () { throw new RuntimeError('Variable "listAttributes" does not exist.', 25, $this->source); })())]);
yield ">
";
// line 26
yield from $this->unwrap()->yieldBlock("children", $context, $blocks);
yield "
</ul>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 31
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_children(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(), "block", "children"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "children"));
// line 33
$context["currentOptions"] = (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 33, $this->source); })());
// line 34
$context["currentItem"] = (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 34, $this->source); })());
// line 36
if ((($tmp = !(null === Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 36, $this->source); })()), "depth", [], "any", false, false, false, 36))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 37
$context["options"] = Twig\Extension\CoreExtension::merge((isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 37, $this->source); })()), ["depth" => (Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["currentOptions"]) || array_key_exists("currentOptions", $context) ? $context["currentOptions"] : (function () { throw new RuntimeError('Variable "currentOptions" does not exist.', 37, $this->source); })()), "depth", [], "any", false, false, false, 37) - 1)]);
}
// line 40
if (( !(null === Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 40, $this->source); })()), "matchingDepth", [], "any", false, false, false, 40)) && (Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 40, $this->source); })()), "matchingDepth", [], "any", false, false, false, 40) > 0))) {
// line 41
$context["options"] = Twig\Extension\CoreExtension::merge((isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 41, $this->source); })()), ["matchingDepth" => (Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["currentOptions"]) || array_key_exists("currentOptions", $context) ? $context["currentOptions"] : (function () { throw new RuntimeError('Variable "currentOptions" does not exist.', 41, $this->source); })()), "matchingDepth", [], "any", false, false, false, 41) - 1)]);
}
// line 43
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["currentItem"]) || array_key_exists("currentItem", $context) ? $context["currentItem"] : (function () { throw new RuntimeError('Variable "currentItem" does not exist.', 43, $this->source); })()), "children", [], "any", false, false, false, 43));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 44
yield " ";
yield from $this->unwrap()->yieldBlock("item", $context, $blocks);
yield "
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 47
$context["item"] = (isset($context["currentItem"]) || array_key_exists("currentItem", $context) ? $context["currentItem"] : (function () { throw new RuntimeError('Variable "currentItem" does not exist.', 47, $this->source); })());
// line 48
$context["options"] = (isset($context["currentOptions"]) || array_key_exists("currentOptions", $context) ? $context["currentOptions"] : (function () { throw new RuntimeError('Variable "currentOptions" does not exist.', 48, $this->source); })());
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 51
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_item(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(), "block", "item"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "item"));
// line 52
if ((($tmp = Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 52, $this->source); })()), "displayed", [], "any", false, false, false, 52)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 54
$context["classes"] = (((($tmp = !Twig\Extension\CoreExtension::testEmpty(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 54, $this->source); })()), "attribute", ["class"], "method", false, false, false, 54))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ([Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 54, $this->source); })()), "attribute", ["class"], "method", false, false, false, 54)]) : ([]));
// line 55
if ((($tmp = Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["matcher"]) || array_key_exists("matcher", $context) ? $context["matcher"] : (function () { throw new RuntimeError('Variable "matcher" does not exist.', 55, $this->source); })()), "isCurrent", [(isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 55, $this->source); })())], "method", false, false, false, 55)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 56
$context["classes"] = Twig\Extension\CoreExtension::merge((isset($context["classes"]) || array_key_exists("classes", $context) ? $context["classes"] : (function () { throw new RuntimeError('Variable "classes" does not exist.', 56, $this->source); })()), [Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 56, $this->source); })()), "currentClass", [], "any", false, false, false, 56)]);
} elseif ((($tmp = Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, // line 57
(isset($context["matcher"]) || array_key_exists("matcher", $context) ? $context["matcher"] : (function () { throw new RuntimeError('Variable "matcher" does not exist.', 57, $this->source); })()), "isAncestor", [(isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 57, $this->source); })()), Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 57, $this->source); })()), "matchingDepth", [], "any", false, false, false, 57)], "method", false, false, false, 57)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 58
$context["classes"] = Twig\Extension\CoreExtension::merge((isset($context["classes"]) || array_key_exists("classes", $context) ? $context["classes"] : (function () { throw new RuntimeError('Variable "classes" does not exist.', 58, $this->source); })()), [Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 58, $this->source); })()), "ancestorClass", [], "any", false, false, false, 58)]);
}
// line 60
if ((($tmp = Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 60, $this->source); })()), "actsLikeFirst", [], "any", false, false, false, 60)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 61
$context["classes"] = Twig\Extension\CoreExtension::merge((isset($context["classes"]) || array_key_exists("classes", $context) ? $context["classes"] : (function () { throw new RuntimeError('Variable "classes" does not exist.', 61, $this->source); })()), [Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 61, $this->source); })()), "firstClass", [], "any", false, false, false, 61)]);
}
// line 63
if ((($tmp = Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 63, $this->source); })()), "actsLikeLast", [], "any", false, false, false, 63)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 64
$context["classes"] = Twig\Extension\CoreExtension::merge((isset($context["classes"]) || array_key_exists("classes", $context) ? $context["classes"] : (function () { throw new RuntimeError('Variable "classes" does not exist.', 64, $this->source); })()), [Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 64, $this->source); })()), "lastClass", [], "any", false, false, false, 64)]);
}
// line 66
yield "
";
// line 68
yield " ";
if ((Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 68, $this->source); })()), "hasChildren", [], "any", false, false, false, 68) && !(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 68, $this->source); })()), "depth", [], "any", false, false, false, 68) === 0))) {
// line 69
yield " ";
if (( !Twig\Extension\CoreExtension::testEmpty(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 69, $this->source); })()), "branch_class", [], "any", false, false, false, 69)) && Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 69, $this->source); })()), "displayChildren", [], "any", false, false, false, 69))) {
// line 70
$context["classes"] = Twig\Extension\CoreExtension::merge((isset($context["classes"]) || array_key_exists("classes", $context) ? $context["classes"] : (function () { throw new RuntimeError('Variable "classes" does not exist.', 70, $this->source); })()), [Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 70, $this->source); })()), "branch_class", [], "any", false, false, false, 70)]);
// line 71
yield " ";
}
// line 72
yield " ";
} elseif ((($tmp = !Twig\Extension\CoreExtension::testEmpty(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 72, $this->source); })()), "leaf_class", [], "any", false, false, false, 72))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 73
$context["classes"] = Twig\Extension\CoreExtension::merge((isset($context["classes"]) || array_key_exists("classes", $context) ? $context["classes"] : (function () { throw new RuntimeError('Variable "classes" does not exist.', 73, $this->source); })()), [Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 73, $this->source); })()), "leaf_class", [], "any", false, false, false, 73)]);
}
// line 76
$context["attributes"] = Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 76, $this->source); })()), "attributes", [], "any", false, false, false, 76);
// line 77
if ((($tmp = !Twig\Extension\CoreExtension::testEmpty((isset($context["classes"]) || array_key_exists("classes", $context) ? $context["classes"] : (function () { throw new RuntimeError('Variable "classes" does not exist.', 77, $this->source); })()))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 78
$context["attributes"] = Twig\Extension\CoreExtension::merge((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 78, $this->source); })()), ["class" => Twig\Extension\CoreExtension::join((isset($context["classes"]) || array_key_exists("classes", $context) ? $context["classes"] : (function () { throw new RuntimeError('Variable "classes" does not exist.', 78, $this->source); })()), " ")]);
}
// line 81
yield " ";
$macros["knp_menu"] = $this;
// line 82
yield " <li";
yield $macros["knp_menu"]->getTemplateForMacro("macro_attributes", $context, 82, $this->getSourceContext())->macro_attributes(...[(isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 82, $this->source); })())]);
yield ">";
// line 83
if (( !Twig\Extension\CoreExtension::testEmpty(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 83, $this->source); })()), "uri", [], "any", false, false, false, 83)) && ( !Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["matcher"]) || array_key_exists("matcher", $context) ? $context["matcher"] : (function () { throw new RuntimeError('Variable "matcher" does not exist.', 83, $this->source); })()), "isCurrent", [(isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 83, $this->source); })())], "method", false, false, false, 83) || Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 83, $this->source); })()), "currentAsLink", [], "any", false, false, false, 83)))) {
// line 84
yield " ";
yield from $this->unwrap()->yieldBlock("linkElement", $context, $blocks);
} else {
// line 86
yield " ";
yield from $this->unwrap()->yieldBlock("spanElement", $context, $blocks);
}
// line 89
$context["childrenClasses"] = (((($tmp = !Twig\Extension\CoreExtension::testEmpty(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 89, $this->source); })()), "childrenAttribute", ["class"], "method", false, false, false, 89))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ([Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 89, $this->source); })()), "childrenAttribute", ["class"], "method", false, false, false, 89)]) : ([]));
// line 90
$context["childrenClasses"] = Twig\Extension\CoreExtension::merge((isset($context["childrenClasses"]) || array_key_exists("childrenClasses", $context) ? $context["childrenClasses"] : (function () { throw new RuntimeError('Variable "childrenClasses" does not exist.', 90, $this->source); })()), [("menu_level_" . Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 90, $this->source); })()), "level", [], "any", false, false, false, 90))]);
// line 91
$context["listAttributes"] = Twig\Extension\CoreExtension::merge(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 91, $this->source); })()), "childrenAttributes", [], "any", false, false, false, 91), ["class" => Twig\Extension\CoreExtension::join((isset($context["childrenClasses"]) || array_key_exists("childrenClasses", $context) ? $context["childrenClasses"] : (function () { throw new RuntimeError('Variable "childrenClasses" does not exist.', 91, $this->source); })()), " ")]);
// line 92
yield " ";
yield from $this->unwrap()->yieldBlock("list", $context, $blocks);
yield "
</li>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 97
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_linkElement(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(), "block", "linkElement"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "linkElement"));
$macros["knp_menu"] = $this;
yield "<a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 97, $this->source); })()), "uri", [], "any", false, false, false, 97), "html", null, true);
yield "\"";
yield $macros["knp_menu"]->getTemplateForMacro("macro_attributes", $context, 97, $this->getSourceContext())->macro_attributes(...[Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 97, $this->source); })()), "linkAttributes", [], "any", false, false, false, 97)]);
yield ">";
yield from $this->unwrap()->yieldBlock("label", $context, $blocks);
yield "</a>";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 99
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_spanElement(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(), "block", "spanElement"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "spanElement"));
$macros["knp_menu"] = $this;
yield "<span";
yield $macros["knp_menu"]->getTemplateForMacro("macro_attributes", $context, 99, $this->getSourceContext())->macro_attributes(...[Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 99, $this->source); })()), "labelAttributes", [], "any", false, false, false, 99)]);
yield ">";
yield from $this->unwrap()->yieldBlock("label", $context, $blocks);
yield "</span>";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 101
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_label(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(), "block", "label"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "label"));
if ((Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["options"]) || array_key_exists("options", $context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.', 101, $this->source); })()), "allow_safe_labels", [], "any", false, false, false, 101) && Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 101, $this->source); })()), "getExtra", ["safe_label", false], "method", false, false, false, 101))) {
yield Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 101, $this->source); })()), "label", [], "any", false, false, false, 101);
} else {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Netgen\Bundle\IbexaSiteApiBundle\Templating\Twig\Node\GetAttrExpressionDecorator::twigGetAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 101, $this->source); })()), "label", [], "any", false, false, false, 101), "html", null, true);
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 3
public function macro_attributes($attributes = null, ...$varargs): string|Markup
{
$macros = $this->macros;
$context = [
"attributes" => $attributes,
"varargs" => $varargs,
] + $this->env->getGlobals();
$blocks = [];
return ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "attributes"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "attributes"));
// line 4
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 4, $this->source); })()));
foreach ($context['_seq'] as $context["name"] => $context["value"]) {
// line 5
if (( !(null === $context["value"]) && !($context["value"] === false))) {
// line 6
yield Twig\Extension\CoreExtension::sprintf(" %s=\"%s\"", $context["name"], ((($context["value"] === true)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["name"])) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["value"]))));
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['name'], $context['value'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
})())) ? '' : new Markup($tmp, $this->env->getCharset());
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "knp_menu.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 451 => 6, 449 => 5, 445 => 4, 427 => 3, 400 => 101, 372 => 99, 342 => 97, 326 => 92, 324 => 91, 322 => 90, 320 => 89, 316 => 86, 312 => 84, 310 => 83, 306 => 82, 303 => 81, 300 => 78, 298 => 77, 296 => 76, 293 => 73, 290 => 72, 287 => 71, 285 => 70, 282 => 69, 279 => 68, 276 => 66, 273 => 64, 271 => 63, 268 => 61, 266 => 60, 263 => 58, 261 => 57, 259 => 56, 257 => 55, 255 => 54, 253 => 52, 240 => 51, 229 => 48, 227 => 47, 210 => 44, 193 => 43, 190 => 41, 188 => 40, 185 => 37, 183 => 36, 181 => 34, 179 => 33, 166 => 31, 151 => 26, 146 => 25, 143 => 24, 141 => 23, 128 => 22, 117 => 19, 115 => 18, 102 => 17, 91 => 12, 85 => 13, 83 => 12, 70 => 11, 47 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'knp_menu_base.html.twig' %}
{% macro attributes(attributes) %}
{% for name, value in attributes %}
{%- if value is not none and value is not same as(false) -%}
{{- ' %s=\"%s\"'|format(name, value is same as(true) ? name|e : value|e)|raw -}}
{%- endif -%}
{%- endfor -%}
{% endmacro %}
{% block compressed_root %}
{% apply knp_menu_spaceless %}
{{ block('root') }}
{% endapply %}
{% endblock %}
{% block root %}
{% set listAttributes = item.childrenAttributes %}
{{ block('list') -}}
{% endblock %}
{% block list %}
{% if item.hasChildren and options.depth is not same as(0) and item.displayChildren %}
{% import _self as knp_menu %}
<ul{{ knp_menu.attributes(listAttributes) }}>
{{ block('children') }}
</ul>
{% endif %}
{% endblock %}
{% block children %}
{# save current variables #}
{% set currentOptions = options %}
{% set currentItem = item %}
{# update the depth for children #}
{% if options.depth is not none %}
{% set options = options|merge({depth: currentOptions.depth - 1}) %}
{% endif %}
{# update the matchingDepth for children #}
{% if options.matchingDepth is not none and options.matchingDepth > 0 %}
{% set options = options|merge({matchingDepth: currentOptions.matchingDepth - 1}) %}
{% endif %}
{% for item in currentItem.children %}
{{ block('item') }}
{% endfor %}
{# restore current variables #}
{% set item = currentItem %}
{% set options = currentOptions %}
{% endblock %}
{% block item %}
{% if item.displayed %}
{# building the class of the item #}
{%- set classes = item.attribute('class') is not empty ? [item.attribute('class')] : [] %}
{%- if matcher.isCurrent(item) %}
{%- set classes = classes|merge([options.currentClass]) %}
{%- elseif matcher.isAncestor(item, options.matchingDepth) %}
{%- set classes = classes|merge([options.ancestorClass]) %}
{%- endif %}
{%- if item.actsLikeFirst %}
{%- set classes = classes|merge([options.firstClass]) %}
{%- endif %}
{%- if item.actsLikeLast %}
{%- set classes = classes|merge([options.lastClass]) %}
{%- endif %}
{# Mark item as \"leaf\" (no children) or as \"branch\" (has children that are displayed) #}
{% if item.hasChildren and options.depth is not same as(0) %}
{% if options.branch_class is not empty and item.displayChildren %}
{%- set classes = classes|merge([options.branch_class]) %}
{% endif %}
{% elseif options.leaf_class is not empty %}
{%- set classes = classes|merge([options.leaf_class]) %}
{%- endif %}
{%- set attributes = item.attributes %}
{%- if classes is not empty %}
{%- set attributes = attributes|merge({class: classes|join(' ')}) %}
{%- endif %}
{# displaying the item #}
{% import _self as knp_menu %}
<li{{ knp_menu.attributes(attributes) }}>
{%- if item.uri is not empty and (not matcher.isCurrent(item) or options.currentAsLink) %}
{{ block('linkElement') }}
{%- else %}
{{ block('spanElement') }}
{%- endif %}
{# render the list of children #}
{%- set childrenClasses = item.childrenAttribute('class') is not empty ? [item.childrenAttribute('class')] : [] %}
{%- set childrenClasses = childrenClasses|merge(['menu_level_' ~ item.level]) %}
{%- set listAttributes = item.childrenAttributes|merge({class: childrenClasses|join(' ')}) %}
{{ block('list') }}
</li>
{% endif %}
{% endblock %}
{% block linkElement %}{% import _self as knp_menu %}<a href=\"{{ item.uri }}\"{{ knp_menu.attributes(item.linkAttributes) }}>{{ block('label') }}</a>{% endblock %}
{% block spanElement %}{% import _self as knp_menu %}<span{{ knp_menu.attributes(item.labelAttributes) }}>{{ block('label') }}</span>{% endblock %}
{% block label %}{% if options.allow_safe_labels and item.getExtra('safe_label', false) %}{{ item.label|raw }}{% else %}{{ item.label }}{% endif %}{% endblock %}
", "knp_menu.html.twig", "/var/www/vhosts/platformv4.alpha.se7enx.com/httpdocs/platformvlegacy4.alpha.se7enx.com/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views/knp_menu.html.twig");
}
}