<?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;
/* @KunstmaanSitemap/Sitemap/view.xml.twig */
class __TwigTemplate_8cc1a3dea8701d3040cf0551f00aa75c 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 = [
];
}
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", "@KunstmaanSitemap/Sitemap/view.xml.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@KunstmaanSitemap/Sitemap/view.xml.twig"));
// line 1
yield "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">
";
// line 3
if (array_key_exists("nodemenu", $context)) {
// line 4
yield " ";
$context['_parent'] = $context;
$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", false, false, false, 4));
$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["topNode"]) {
// line 5
yield " ";
if ( !$this->extensions['Kunstmaan\SitemapBundle\Twig\SitemapTwigExtension']->isHiddenFromSitemap($context["topNode"])) {
// line 6
yield " <url>
<loc>";
// line 7
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", false, false, false, 7)]), "html", null, true);
yield "</loc>
<lastmod>";
// line 8
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["topNode"], "nodeTranslation", [], "any", false, false, false, 8), "getPublicNodeVersion", [], "method", false, false, false, 8), "getUpdated", [], "method", false, false, false, 8), "Y-m-d"), "html", null, true);
yield "</lastmod>
<priority>";
// line 9
yield "0.9";
yield "</priority>
</url>
";
}
// line 12
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["topNode"], "getChildren", [], "method", false, false, false, 12));
$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["node"]) {
// line 13
yield " ";
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]));
// line 14
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['node'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 15
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['topNode'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
yield " ";
}
// line 17
yield " ";
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); })())))) {
// line 18
yield " ";
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 19
yield " <url>
<loc>";
// line 20
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, false, 20), "html", null, true);
yield "</loc>
<lastmod>";
// line 21
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "lastModified", [], "any", false, false, false, 21), "Y-m-d"), "html", null, true);
yield "</lastmod>
<priority>";
// line 22
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "priority", [], "any", false, false, false, 22), "html", null, true);
yield "</priority>
</url>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 25
yield " ";
}
// line 26
yield "</urlset>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@KunstmaanSitemap/Sitemap/view.xml.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">
{% if nodemenu is defined %}
{% for topNode in nodemenu.getTopNodes() %}
{% if not hide_from_sitemap(topNode) %}
<url>
<loc>{{ url('_slug', { '_locale': locale, 'url': topNode.slug }) }}</loc>
<lastmod>{{ topNode.nodeTranslation.getPublicNodeVersion().getUpdated()|date('Y-m-d') }}</lastmod>
<priority>{{ \"0.9\" }}</priority>
</url>
{% endif %}
{% for node in topNode.getChildren() %}
{% include '@KunstmaanSitemap/Sitemap/entry.xml.twig' with {'entry' : node, 'priority' : 9 } %}
{% endfor %}
{% endfor %}
{% endif %}
{% if extraItems is defined and extraItems is not empty %}
{% for item in extraItems %}
<url>
<loc>{{ item.url }}</loc>
<lastmod>{{ item.lastModified|date('Y-m-d') }}</lastmod>
<priority>{{ item.priority }}</priority>
</url>
{% endfor %}
{% endif %}
</urlset>
", "@KunstmaanSitemap/Sitemap/view.xml.twig", "/home/u363484990/domains/iut-udc.online/public_html/vendor/kunstmaan/sitemap-bundle/Resources/views/Sitemap/view.xml.twig");
}
}