var/cache/dev/twig/48/48520622997d996125d89d6c46137d914be111831229cc3a4f7b73aaee8a048d.php line 100

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* PageParts/DirectusLatestEventsPagePart/view.html.twig */
  14. class __TwigTemplate_6f8dc6f2421fe6c13aa513f1b363bed2f8a5db6877cb8c031e82469fdf6f0842 extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""PageParts/DirectusLatestEventsPagePart/view.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""PageParts/DirectusLatestEventsPagePart/view.html.twig"));
  33.         // line 1
  34.         echo "<div class=\"latest-events-box-pp\" ";
  35.         if ((twig_get_attribute($this->env$this->source, ($context["resource"] ?? null), "background", [], "any"truetruefalse1) && 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"falsefalsefalse1))) {
  36.             echo "style=\"background-image: url('";
  37.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse1), "url", [], "any"falsefalsefalse1)), "html"nulltrue);
  38.             echo "')\"";
  39.         }
  40.         echo ">
  41.     <section class=\"latest-events content\">
  42.         ";
  43.         // line 3
  44.         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"falsefalsefalse3)) {
  45.             // line 4
  46.             echo "            <h2>
  47.                 ";
  48.             // line 5
  49.             if ((twig_get_attribute($this->env$this->source, ($context["resource"] ?? null), "linkUrl", [], "any"truetruefalse5) && 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"falsefalsefalse5))) {
  50.                 // line 6
  51.                 echo "                    <a href=\"";
  52.                 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"falsefalsefalse6)), "html"nulltrue);
  53.                 echo "\" ";
  54.                 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"falsefalsefalse6)) {
  55.                     echo " target=\"_blank\" rel=\"noopener\"";
  56.                 }
  57.                 echo ">
  58.                 ";
  59.             }
  60.             // line 8
  61.             echo "                ";
  62.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse8), "html"nulltrue);
  63.             echo "
  64.                 ";
  65.             // line 9
  66.             if ((twig_get_attribute($this->env$this->source, ($context["resource"] ?? null), "linkUrl", [], "any"truetruefalse9) && 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"falsefalsefalse9))) {
  67.                 // line 10
  68.                 echo "                    </a>
  69.                 ";
  70.             }
  71.             // line 12
  72.             echo "            </h2>
  73.         ";
  74.         }
  75.         // line 14
  76.         echo "
  77.         ";
  78.         // line 15
  79.         $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"falsefalsefalse15));
  80.         // line 16
  81.         echo "        ";
  82.         $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); })()), "/");
  83.         // line 17
  84.         echo "        ";
  85.         $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); })()));
  86.         // line 18
  87.         echo "
  88.         <div class=\"events-slider\">
  89.             ";
  90.         // line 20
  91.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragmentStrategy("esi"Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\EventsDirectusController:lastEvents", ["limit" => 15"sports" => [=> ""], "slug" => (isset($context["slug"]) || array_key_exists("slug"$context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.'20$this->source); })())]));
  92.         echo "
  93.         </div>
  94.         <div class=\"text--right\">
  95.             <a href=\"";
  96.         // line 24
  97.         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"nulltrue);
  98.         echo "\" class=\"btn btn--blue\">";
  99.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("events.latest_events.button"), "html"nulltrue);
  100.         echo "</a>
  101.         </div>
  102.     </section>
  103. </div>
  104. ";
  105.         
  106.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  107.         
  108.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  109.     }
  110.     public function getTemplateName()
  111.     {
  112.         return "PageParts/DirectusLatestEventsPagePart/view.html.twig";
  113.     }
  114.     public function isTraitable()
  115.     {
  116.         return false;
  117.     }
  118.     public function getDebugInfo()
  119.     {
  120.         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,);
  121.     }
  122.     public function getSourceContext()
  123.     {
  124.         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 %}>
  125.     <section class=\"latest-events content\">
  126.         {% if resource.header %}
  127.             <h2>
  128.                 {% if resource.linkUrl is defined and resource.linkUrl %}
  129.                     <a href=\"{{ resource.linkUrl | replace_url }}\" {% if resource.linkNewWindow %} target=\"_blank\" rel=\"noopener\"{% endif %}>
  130.                 {% endif %}
  131.                 {{ resource.header }}
  132.                 {% if resource.linkUrl is defined and resource.linkUrl %}
  133.                     </a>
  134.                 {% endif %}
  135.             </h2>
  136.         {% endif %}
  137.         {% set url = (resource.linkUrl | replace_url) %}
  138.         {% set parts = url|split('/') %}
  139.         {% set slug = parts|last %}
  140.         <div class=\"events-slider\">
  141.             {{ render_esi(controller('App\\\\Controller\\\\EventsDirectusController:lastEvents', { 'limit' :  15, 'sports' : [''], 'slug' : slug  } )) }}
  142.         </div>
  143.         <div class=\"text--right\">
  144.             <a href=\"{{ url }}\" class=\"btn btn--blue\">{{ 'events.latest_events.button' | trans }}</a>
  145.         </div>
  146.     </section>
  147. </div>
  148. ""PageParts/DirectusLatestEventsPagePart/view.html.twig""/var/www/gcs/html/dev/templates/PageParts/DirectusLatestEventsPagePart/view.html.twig");
  149.     }
  150. }