var/cache/dev/twig/03/036916322c9e428ec4e2db8f0eb5760fe9b32e35ca0b59ea03d756366d98a325.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. /* app/partials/navigation.html.twig */
  16. class __TwigTemplate_122f8f3509b9ea5ca169c558c373afed0a1298a1aa964560616c73fd55b768ca 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""app/partials/navigation.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""app/partials/navigation.html.twig"));
  40.         // line 2
  41.         $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"falsefalsetrue2);
  42.         // line 3
  43.         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")) {
  44.             // line 4
  45.             yield "    ";
  46.             $context["navStartNode"] = Pimcore\Model\Document::getById(1);
  47.         }
  48.         // line 6
  49.         yield "
  50. ";
  51.         // line 7
  52.         $context["mainNavigation"] = $this->env->getFunction('pimcore_build_nav')->getCallable()(["active" => $this->sandbox->ensureToStringAllowed(        // line 8
  53. (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
  54. (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)]);
  55.         // line 11
  56.         yield "
  57. <div class=\"container items-center hidden h-full lg:flex\">
  58.     ";
  59.         // line 14
  60.         yield "    ";
  61.         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"falsefalsetrue14), 14$this->source));
  62.         yield "
  63. ";
  64.         // line 18
  65.         yield "</div>";
  66.         
  67.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  68.         
  69.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  70.         yield from [];
  71.     }
  72.     /**
  73.      * @codeCoverageIgnore
  74.      */
  75.     public function getTemplateName(): string
  76.     {
  77.         return "app/partials/navigation.html.twig";
  78.     }
  79.     /**
  80.      * @codeCoverageIgnore
  81.      */
  82.     public function isTraitable(): bool
  83.     {
  84.         return false;
  85.     }
  86.     /**
  87.      * @codeCoverageIgnore
  88.      */
  89.     public function getDebugInfo(): array
  90.     {
  91.         return array (  75 => 18,  69 => 14,  65 => 11,  63 => 9,  62 => 8,  61 => 7,  58 => 6,  54 => 4,  52 => 3,  50 => 2,);
  92.     }
  93.     public function getSourceContext(): Source
  94.     {
  95.         return new Source("{# get the document which should be used to start in navigation | default home #}
  96. {% set navStartNode = document.getProperty('navigationRoot') %}
  97. {% if not navStartNode is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Page') %}
  98.     {% set navStartNode = pimcore_document(1) %}
  99. {% endif %}
  100. {% set mainNavigation = pimcore_build_nav({
  101.     active: document,
  102.     root: navStartNode
  103. }) %}
  104. <div class=\"container items-center hidden h-full lg:flex\">
  105.     {# include a document-snippet - in this case the navigationSnippet #}
  106.     {{ pimcore_inc(document.getProperty('navigationSnippet')) }}
  107. {#    #}{# later you can render the navigation #}
  108. {#    {{ pimcore_render_nav(mainNavigation) }}#}
  109. </div>""app/partials/navigation.html.twig""/home/forge/testing.coolworld.ptchr.dev/templates/app/partials/navigation.html.twig");
  110.     }
  111.     
  112.     public function checkSecurity()
  113.     {
  114.         static $tags = ["set" => 2"if" => 3];
  115.         static $filters = [];
  116.         static $functions = ["pimcore_document" => 4"pimcore_build_nav" => 7"pimcore_inc" => 14];
  117.         try {
  118.             $this->sandbox->checkSecurity(
  119.                 ['set''if'],
  120.                 [],
  121.                 ['pimcore_document''pimcore_build_nav''pimcore_inc'],
  122.                 $this->source
  123.             );
  124.         } catch (SecurityError $e) {
  125.             $e->setSourceContext($this->source);
  126.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  127.                 $e->setTemplateLine($tags[$e->getTagName()]);
  128.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  129.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  130.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  131.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  132.             }
  133.             throw $e;
  134.         }
  135.     }
  136. }