<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* PageParts/DirectusLatestEventsPagePart/view.html.twig */
class __TwigTemplate_6f8dc6f2421fe6c13aa513f1b363bed2f8a5db6877cb8c031e82469fdf6f0842 extends \Twig\Template
{
private $source;
private $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 = [])
{
$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", "PageParts/DirectusLatestEventsPagePart/view.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "PageParts/DirectusLatestEventsPagePart/view.html.twig"));
// line 1
echo "<div class=\"latest-events-box-pp\" ";
if ((twig_get_attribute($this->env, $this->source, ($context["resource"] ?? null), "background", [], "any", true, true, false, 1) && twig_get_attribute($this->env, $this->source, (isset($context["resource"]) || array_key_exists("resource", $context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.', 1, $this->source); })()), "background", [], "any", false, false, false, 1))) {
echo "style=\"background-image: url('";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["resource"]) || array_key_exists("resource", $context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.', 1, $this->source); })()), "background", [], "any", false, false, false, 1), "url", [], "any", false, false, false, 1)), "html", null, true);
echo "')\"";
}
echo ">
<section class=\"latest-events content\">
";
// line 3
if (twig_get_attribute($this->env, $this->source, (isset($context["resource"]) || array_key_exists("resource", $context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.', 3, $this->source); })()), "header", [], "any", false, false, false, 3)) {
// line 4
echo " <h2>
";
// line 5
if ((twig_get_attribute($this->env, $this->source, ($context["resource"] ?? null), "linkUrl", [], "any", true, true, false, 5) && twig_get_attribute($this->env, $this->source, (isset($context["resource"]) || array_key_exists("resource", $context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.', 5, $this->source); })()), "linkUrl", [], "any", false, false, false, 5))) {
// line 6
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Kunstmaan\NodeBundle\Twig\UrlReplaceTwigExtension']->replaceUrl(twig_get_attribute($this->env, $this->source, (isset($context["resource"]) || array_key_exists("resource", $context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.', 6, $this->source); })()), "linkUrl", [], "any", false, false, false, 6)), "html", null, true);
echo "\" ";
if (twig_get_attribute($this->env, $this->source, (isset($context["resource"]) || array_key_exists("resource", $context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.', 6, $this->source); })()), "linkNewWindow", [], "any", false, false, false, 6)) {
echo " target=\"_blank\" rel=\"noopener\"";
}
echo ">
";
}
// line 8
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["resource"]) || array_key_exists("resource", $context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.', 8, $this->source); })()), "header", [], "any", false, false, false, 8), "html", null, true);
echo "
";
// line 9
if ((twig_get_attribute($this->env, $this->source, ($context["resource"] ?? null), "linkUrl", [], "any", true, true, false, 9) && twig_get_attribute($this->env, $this->source, (isset($context["resource"]) || array_key_exists("resource", $context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.', 9, $this->source); })()), "linkUrl", [], "any", false, false, false, 9))) {
// line 10
echo " </a>
";
}
// line 12
echo " </h2>
";
}
// line 14
echo "
";
// line 15
$context["url"] = $this->extensions['Kunstmaan\NodeBundle\Twig\UrlReplaceTwigExtension']->replaceUrl(twig_get_attribute($this->env, $this->source, (isset($context["resource"]) || array_key_exists("resource", $context) ? $context["resource"] : (function () { throw new RuntimeError('Variable "resource" does not exist.', 15, $this->source); })()), "linkUrl", [], "any", false, false, false, 15));
// line 16
echo " ";
$context["parts"] = twig_split_filter($this->env, (isset($context["url"]) || array_key_exists("url", $context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.', 16, $this->source); })()), "/");
// line 17
echo " ";
$context["slug"] = twig_last($this->env, (isset($context["parts"]) || array_key_exists("parts", $context) ? $context["parts"] : (function () { throw new RuntimeError('Variable "parts" does not exist.', 17, $this->source); })()));
// line 18
echo "
<div class=\"events-slider\">
";
// line 20
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragmentStrategy("esi", Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\EventsDirectusController:lastEvents", ["limit" => 15, "sports" => [0 => ""], "slug" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 20, $this->source); })())]));
echo "
</div>
<div class=\"text--right\">
<a href=\"";
// line 24
echo twig_escape_filter($this->env, (isset($context["url"]) || array_key_exists("url", $context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.', 24, $this->source); })()), "html", null, true);
echo "\" class=\"btn btn--blue\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("events.latest_events.button"), "html", null, true);
echo "</a>
</div>
</section>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "PageParts/DirectusLatestEventsPagePart/view.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 107 => 24, 100 => 20, 96 => 18, 93 => 17, 90 => 16, 88 => 15, 85 => 14, 81 => 12, 77 => 10, 75 => 9, 70 => 8, 60 => 6, 58 => 5, 55 => 4, 53 => 3, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"latest-events-box-pp\" {% if resource.background is defined and resource.background %}style=\"background-image: url('{{ asset(resource.background.url) }}')\"{% endif %}>
<section class=\"latest-events content\">
{% if resource.header %}
<h2>
{% if resource.linkUrl is defined and resource.linkUrl %}
<a href=\"{{ resource.linkUrl | replace_url }}\" {% if resource.linkNewWindow %} target=\"_blank\" rel=\"noopener\"{% endif %}>
{% endif %}
{{ resource.header }}
{% if resource.linkUrl is defined and resource.linkUrl %}
</a>
{% endif %}
</h2>
{% endif %}
{% set url = (resource.linkUrl | replace_url) %}
{% set parts = url|split('/') %}
{% set slug = parts|last %}
<div class=\"events-slider\">
{{ render_esi(controller('App\\\\Controller\\\\EventsDirectusController:lastEvents', { 'limit' : 15, 'sports' : [''], 'slug' : slug } )) }}
</div>
<div class=\"text--right\">
<a href=\"{{ url }}\" class=\"btn btn--blue\">{{ 'events.latest_events.button' | trans }}</a>
</div>
</section>
</div>
", "PageParts/DirectusLatestEventsPagePart/view.html.twig", "/var/www/gcs/html/dev/templates/PageParts/DirectusLatestEventsPagePart/view.html.twig");
}
}