var/cache/dev/twig/89/891a167e2a1c3bb34bd2b45a9a9872ac.php line 38

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. /* @KunstmaanSitemap/Sitemap/view.xml.twig */
  16. class __TwigTemplate_8cc1a3dea8701d3040cf0551f00aa75c 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.     }
  31.     protected function doDisplay(array $context, array $blocks = []): iterable
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@KunstmaanSitemap/Sitemap/view.xml.twig"));
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@KunstmaanSitemap/Sitemap/view.xml.twig"));
  38.         // line 1
  39.         yield "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
  40. <urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">
  41.     ";
  42.         // line 3
  43.         if (array_key_exists("nodemenu"$context)) {
  44.             // line 4
  45.             yield "        ";
  46.             $context['_parent'] = $context;
  47.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, (isset($context["nodemenu"]) || array_key_exists("nodemenu"$context) ? $context["nodemenu"] : (function () { throw new RuntimeError('Variable "nodemenu" does not exist.'4$this->source); })()), "getTopNodes", [], "method"falsefalsefalse4));
  48.             $context['loop'] = [
  49.               'parent' => $context['_parent'],
  50.               'index0' => 0,
  51.               'index'  => 1,
  52.               'first'  => true,
  53.             ];
  54.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  55.                 $length count($context['_seq']);
  56.                 $context['loop']['revindex0'] = $length 1;
  57.                 $context['loop']['revindex'] = $length;
  58.                 $context['loop']['length'] = $length;
  59.                 $context['loop']['last'] = === $length;
  60.             }
  61.             foreach ($context['_seq'] as $context["_key"] => $context["topNode"]) {
  62.                 // line 5
  63.                 yield "            ";
  64.                 if ( !$this->extensions['Kunstmaan\SitemapBundle\Twig\SitemapTwigExtension']->isHiddenFromSitemap($context["topNode"])) {
  65.                     // line 6
  66.                     yield "                <url>
  67.                     <loc>";
  68.                     // line 7
  69.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("_slug", ["_locale" => (isset($context["locale"]) || array_key_exists("locale"$context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.'7$this->source); })()), "url" => CoreExtension::getAttribute($this->env$this->source$context["topNode"], "slug", [], "any"falsefalsefalse7)]), "html"nulltrue);
  70.                     yield "</loc>
  71.                     <lastmod>";
  72.                     // line 8
  73.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["topNode"], "nodeTranslation", [], "any"falsefalsefalse8), "getPublicNodeVersion", [], "method"falsefalsefalse8), "getUpdated", [], "method"falsefalsefalse8), "Y-m-d"), "html"nulltrue);
  74.                     yield "</lastmod>
  75.                     <priority>";
  76.                     // line 9
  77.                     yield "0.9";
  78.                     yield "</priority>
  79.                 </url>
  80.             ";
  81.                 }
  82.                 // line 12
  83.                 yield "            ";
  84.                 $context['_parent'] = $context;
  85.                 $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source$context["topNode"], "getChildren", [], "method"falsefalsefalse12));
  86.                 $context['loop'] = [
  87.                   'parent' => $context['_parent'],
  88.                   'index0' => 0,
  89.                   'index'  => 1,
  90.                   'first'  => true,
  91.                 ];
  92.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  93.                     $length count($context['_seq']);
  94.                     $context['loop']['revindex0'] = $length 1;
  95.                     $context['loop']['revindex'] = $length;
  96.                     $context['loop']['length'] = $length;
  97.                     $context['loop']['last'] = === $length;
  98.                 }
  99.                 foreach ($context['_seq'] as $context["_key"] => $context["node"]) {
  100.                     // line 13
  101.                     yield "                ";
  102.                     yield from $this->loadTemplate("@KunstmaanSitemap/Sitemap/entry.xml.twig""@KunstmaanSitemap/Sitemap/view.xml.twig"13)->unwrap()->yield(CoreExtension::merge($context, ["entry" => $context["node"], "priority" => 9]));
  103.                     // line 14
  104.                     yield "            ";
  105.                     ++$context['loop']['index0'];
  106.                     ++$context['loop']['index'];
  107.                     $context['loop']['first'] = false;
  108.                     if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  109.                         --$context['loop']['revindex0'];
  110.                         --$context['loop']['revindex'];
  111.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  112.                     }
  113.                 }
  114.                 $_parent $context['_parent'];
  115.                 unset($context['_seq'], $context['_key'], $context['node'], $context['_parent'], $context['loop']);
  116.                 $context array_intersect_key($context$_parent) + $_parent;
  117.                 // line 15
  118.                 yield "        ";
  119.                 ++$context['loop']['index0'];
  120.                 ++$context['loop']['index'];
  121.                 $context['loop']['first'] = false;
  122.                 if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  123.                     --$context['loop']['revindex0'];
  124.                     --$context['loop']['revindex'];
  125.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  126.                 }
  127.             }
  128.             $_parent $context['_parent'];
  129.             unset($context['_seq'], $context['_key'], $context['topNode'], $context['_parent'], $context['loop']);
  130.             $context array_intersect_key($context$_parent) + $_parent;
  131.             // line 16
  132.             yield "    ";
  133.         }
  134.         // line 17
  135.         yield "    ";
  136.         if ((array_key_exists("extraItems"$context) &&  !Twig\Extension\CoreExtension::testEmpty((isset($context["extraItems"]) || array_key_exists("extraItems"$context) ? $context["extraItems"] : (function () { throw new RuntimeError('Variable "extraItems" does not exist.'17$this->source); })())))) {
  137.             // line 18
  138.             yield "        ";
  139.             $context['_parent'] = $context;
  140.             $context['_seq'] = CoreExtension::ensureTraversable((isset($context["extraItems"]) || array_key_exists("extraItems"$context) ? $context["extraItems"] : (function () { throw new RuntimeError('Variable "extraItems" does not exist.'18$this->source); })()));
  141.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  142.                 // line 19
  143.                 yield "            <url>
  144.                 <loc>";
  145.                 // line 20
  146.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "url", [], "any"falsefalsefalse20), "html"nulltrue);
  147.                 yield "</loc>
  148.                 <lastmod>";
  149.                 // line 21
  150.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["item"], "lastModified", [], "any"falsefalsefalse21), "Y-m-d"), "html"nulltrue);
  151.                 yield "</lastmod>
  152.                 <priority>";
  153.                 // line 22
  154.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "priority", [], "any"falsefalsefalse22), "html"nulltrue);
  155.                 yield "</priority>
  156.             </url>
  157.         ";
  158.             }
  159.             $_parent $context['_parent'];
  160.             unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
  161.             $context array_intersect_key($context$_parent) + $_parent;
  162.             // line 25
  163.             yield "    ";
  164.         }
  165.         // line 26
  166.         yield "</urlset>
  167. ";
  168.         
  169.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  170.         
  171.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  172.         yield from [];
  173.     }
  174.     /**
  175.      * @codeCoverageIgnore
  176.      */
  177.     public function getTemplateName(): string
  178.     {
  179.         return "@KunstmaanSitemap/Sitemap/view.xml.twig";
  180.     }
  181.     /**
  182.      * @codeCoverageIgnore
  183.      */
  184.     public function isTraitable(): bool
  185.     {
  186.         return false;
  187.     }
  188.     /**
  189.      * @codeCoverageIgnore
  190.      */
  191.     public function getDebugInfo(): array
  192.     {
  193.         return array (  175 => 26,  172 => 25,  163 => 22,  159 => 21,  155 => 20,  152 => 19,  147 => 18,  144 => 17,  141 => 16,  127 => 15,  113 => 14,  110 => 13,  92 => 12,  86 => 9,  82 => 8,  78 => 7,  75 => 6,  72 => 5,  54 => 4,  52 => 3,  48 => 1,);
  194.     }
  195.     public function getSourceContext(): Source
  196.     {
  197.         return new Source("<?xml version=\"1.0\" encoding=\"UTF-8\"?>
  198. <urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">
  199.     {% if nodemenu is defined %}
  200.         {% for topNode in nodemenu.getTopNodes() %}
  201.             {% if not hide_from_sitemap(topNode) %}
  202.                 <url>
  203.                     <loc>{{ url('_slug', { '_locale': locale, 'url': topNode.slug }) }}</loc>
  204.                     <lastmod>{{ topNode.nodeTranslation.getPublicNodeVersion().getUpdated()|date('Y-m-d') }}</lastmod>
  205.                     <priority>{{ \"0.9\" }}</priority>
  206.                 </url>
  207.             {% endif %}
  208.             {% for node in topNode.getChildren() %}
  209.                 {% include '@KunstmaanSitemap/Sitemap/entry.xml.twig' with {'entry' : node, 'priority' : 9 } %}
  210.             {% endfor %}
  211.         {% endfor %}
  212.     {% endif %}
  213.     {% if extraItems is defined and extraItems is not empty %}
  214.         {% for item in extraItems %}
  215.             <url>
  216.                 <loc>{{ item.url }}</loc>
  217.                 <lastmod>{{ item.lastModified|date('Y-m-d') }}</lastmod>
  218.                 <priority>{{ item.priority }}</priority>
  219.             </url>
  220.         {% endfor %}
  221.     {% endif %}
  222. </urlset>
  223. ""@KunstmaanSitemap/Sitemap/view.xml.twig""/home/u363484990/domains/iut-udc.online/public_html/vendor/kunstmaan/sitemap-bundle/Resources/views/Sitemap/view.xml.twig");
  224.     }
  225. }