<?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;
/* app/partials/navigation.html.twig */
class __TwigTemplate_122f8f3509b9ea5ca169c558c373afed0a1298a1aa964560616c73fd55b768ca 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "app/partials/navigation.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "app/partials/navigation.html.twig"));
// line 2
$context["navStartNode"] = 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.', 2, $this->source); })()), "getProperty", ["navigationRoot"], "method", false, false, true, 2);
// line 3
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.', 3, $this->source); })()), "\\Pimcore\\Model\\Document\\Page")) {
// line 4
yield " ";
$context["navStartNode"] = Pimcore\Model\Document::getById(1);
}
// line 6
yield "
";
// line 7
$context["mainNavigation"] = $this->env->getFunction('pimcore_build_nav')->getCallable()(["active" => $this->sandbox->ensureToStringAllowed( // line 8
(isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 8, $this->source); })()), 8, $this->source), "root" => $this->sandbox->ensureToStringAllowed( // line 9
(isset($context["navStartNode"]) || array_key_exists("navStartNode", $context) ? $context["navStartNode"] : (function () { throw new RuntimeError('Variable "navStartNode" does not exist.', 9, $this->source); })()), 9, $this->source)]);
// line 11
yield "
<div class=\"container items-center hidden h-full lg:flex\">
";
// line 14
yield " ";
yield $this->env->getFunction('pimcore_inc')->getCallable()($this->sandbox->ensureToStringAllowed(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.', 14, $this->source); })()), "getProperty", ["navigationSnippet"], "method", false, false, true, 14), 14, $this->source));
yield "
";
// line 18
yield "</div>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "app/partials/navigation.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 75 => 18, 69 => 14, 65 => 11, 63 => 9, 62 => 8, 61 => 7, 58 => 6, 54 => 4, 52 => 3, 50 => 2,);
}
public function getSourceContext(): Source
{
return new Source("{# get the document which should be used to start in navigation | default home #}
{% set navStartNode = document.getProperty('navigationRoot') %}
{% if not navStartNode is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Page') %}
{% set navStartNode = pimcore_document(1) %}
{% endif %}
{% set mainNavigation = pimcore_build_nav({
active: document,
root: navStartNode
}) %}
<div class=\"container items-center hidden h-full lg:flex\">
{# include a document-snippet - in this case the navigationSnippet #}
{{ pimcore_inc(document.getProperty('navigationSnippet')) }}
{# #}{# later you can render the navigation #}
{# {{ pimcore_render_nav(mainNavigation) }}#}
</div>", "app/partials/navigation.html.twig", "/home/forge/testing.coolworld.ptchr.dev/templates/app/partials/navigation.html.twig");
}
public function checkSecurity()
{
static $tags = ["set" => 2, "if" => 3];
static $filters = [];
static $functions = ["pimcore_document" => 4, "pimcore_build_nav" => 7, "pimcore_inc" => 14];
try {
$this->sandbox->checkSecurity(
['set', 'if'],
[],
['pimcore_document', 'pimcore_build_nav', 'pimcore_inc'],
$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;
}
}
}