var/cache/dev/twig/85/85e9eb89e9692c3cc8191b370c708605.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. /* Layout/_news.html.twig */
  16. class __TwigTemplate_af335bde92a21fa1dbbce609e4e7528a 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""Layout/_news.html.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""Layout/_news.html.twig"));
  38.         // line 1
  39.         if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), $this->extensions['IUTUDC\WebsiteBundle\Twig\FunctionTwigExtension']->getLastNews()) > 0)) {
  40.             // line 2
  41.             yield "    <section class=\"news\">
  42.         <div class=\"container\">
  43.             <div class=\"row\">
  44.                 <div class=\"col\">
  45.                     <h1 class=\"t-light section-title\">News &amp; Evenements</h1>
  46.                 </div>
  47.             </div>
  48.                 <div class=\"row\">
  49.                     ";
  50.             // line 11
  51.             $context["count"] = 0;
  52.             // line 12
  53.             yield "                    ";
  54.             $context['_parent'] = $context;
  55.             $context['_seq'] = CoreExtension::ensureTraversable($this->extensions['IUTUDC\WebsiteBundle\Twig\FunctionTwigExtension']->getLastNews());
  56.             foreach ($context['_seq'] as $context["_key"] => $context["article"]) {
  57.                 // line 13
  58.                 yield "                        ";
  59.                 $context["articlenode"] = $this->extensions['Kunstmaan\NodeBundle\Twig\NodeTwigExtension']->getNodeTranslationFor($context["article"]);
  60.                 // line 14
  61.                 yield "                        <div class=\"col-sm\">
  62.                             <div class=\"block-event\">
  63.                                 ";
  64.                 // line 16
  65.                 if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source$context["article"], "image", [], "any"falsefalsefalse16))) {
  66.                     // line 17
  67.                     yield "                                    <div class=\"event-img\">
  68.                                         <a href=\"";
  69.                     // line 18
  70.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["articlenode"]) || array_key_exists("articlenode"$context) ? $context["articlenode"] : (function () { throw new RuntimeError('Variable "articlenode" does not exist.'18$this->source); })()), "url", [], "any"falsefalsefalse18), "html"nulltrue);
  71.                     yield "\"><img src=\"";
  72.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["article"], "image", [], "any"falsefalsefalse18), "url", [], "any"falsefalsefalse18)), "html"nulltrue);
  73.                     yield "\" ";
  74.                     if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source$context["article"], "imageAltText", [], "any"falsefalsefalse18))) {
  75.                         yield "alt=\"";
  76.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["article"], "imageAltText", [], "any"falsefalsefalse18), "html"nulltrue);
  77.                         yield "\"";
  78.                     }
  79.                     yield " /></a>
  80.                                     </div>
  81.                                 ";
  82.                 }
  83.                 // line 21
  84.                 yield "                                <div class=\"event-caption c-";
  85.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'21$this->source); })()), "html"nulltrue);
  86.                 yield "\">
  87.                                     <h3 class=\"event-title\">";
  88.                 // line 22
  89.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["article"], "title", [], "any"falsefalsefalse22), "html"nulltrue);
  90.                 yield "</h3>
  91.                                     <div class=\"event-text\">
  92.                                         <p>
  93.                                             ";
  94.                 // line 25
  95.                 yield $this->extensions['Kunstmaan\NodeBundle\Twig\UrlReplaceTwigExtension']->replaceUrl(Twig\Extension\CoreExtension::slice($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->source$context["article"], "summary", [], "any"falsefalsefalse25), 070));
  96.                 yield "
  97.                                         </p>
  98.                                     </div>
  99.                                     <div class=\"event-footer\">
  100.                                         <a href=\"";
  101.                 // line 29
  102.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["articlenode"]) || array_key_exists("articlenode"$context) ? $context["articlenode"] : (function () { throw new RuntimeError('Variable "articlenode" does not exist.'29$this->source); })()), "url", [], "any"falsefalsefalse29), "html"nulltrue);
  103.                 yield "\">Lire plus</a>
  104.                                     </div>
  105.                                 </div>
  106.                             </div>
  107.                         </div>
  108.                         ";
  109.                 // line 34
  110.                 $context["count"] = ((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'34$this->source); })()) + 1);
  111.                 // line 35
  112.                 yield "                    ";
  113.             }
  114.             $_parent $context['_parent'];
  115.             unset($context['_seq'], $context['_key'], $context['article'], $context['_parent']);
  116.             $context array_intersect_key($context$_parent) + $_parent;
  117.             // line 36
  118.             yield "                </div>
  119.                 <div class=\"row\">
  120.                     <div class=\"col a-plus\">
  121.                         ";
  122.             // line 39
  123.             $context["newsPageNode"] = 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.'39$this->source); })()), "getNodeByInternalName", ["news"], "method"falsefalsefalse39);
  124.             // line 40
  125.             yield "                        <a href=\"";
  126.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("_slug", ["url" => CoreExtension::getAttribute($this->env$this->source, (isset($context["newsPageNode"]) || array_key_exists("newsPageNode"$context) ? $context["newsPageNode"] : (function () { throw new RuntimeError('Variable "newsPageNode" does not exist.'40$this->source); })()), "slug", [], "any"falsefalsefalse40)]), "html"nulltrue);
  127.             yield "\">Plus de news</a>
  128.                     </div>
  129.                 </div>
  130.         </div>
  131.     </section>
  132. ";
  133.         }
  134.         
  135.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  136.         
  137.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  138.         yield from [];
  139.     }
  140.     /**
  141.      * @codeCoverageIgnore
  142.      */
  143.     public function getTemplateName(): string
  144.     {
  145.         return "Layout/_news.html.twig";
  146.     }
  147.     /**
  148.      * @codeCoverageIgnore
  149.      */
  150.     public function isTraitable(): bool
  151.     {
  152.         return false;
  153.     }
  154.     /**
  155.      * @codeCoverageIgnore
  156.      */
  157.     public function getDebugInfo(): array
  158.     {
  159.         return array (  135 => 40,  133 => 39,  128 => 36,  122 => 35,  120 => 34,  112 => 29,  105 => 25,  99 => 22,  94 => 21,  80 => 18,  77 => 17,  75 => 16,  71 => 14,  68 => 13,  63 => 12,  61 => 11,  50 => 2,  48 => 1,);
  160.     }
  161.     public function getSourceContext(): Source
  162.     {
  163.         return new Source("{% if get_last_news()|length > 0 %}
  164.     <section class=\"news\">
  165.         <div class=\"container\">
  166.             <div class=\"row\">
  167.                 <div class=\"col\">
  168.                     <h1 class=\"t-light section-title\">News &amp; Evenements</h1>
  169.                 </div>
  170.             </div>
  171.                 <div class=\"row\">
  172.                     {% set count = 0 %}
  173.                     {% for article in get_last_news() %}
  174.                         {% set articlenode = get_node_translation_for(article) %}
  175.                         <div class=\"col-sm\">
  176.                             <div class=\"block-event\">
  177.                                 {% if article.image is not empty %}
  178.                                     <div class=\"event-img\">
  179.                                         <a href=\"{{ articlenode.url }}\"><img src=\"{{ asset(article.image.url) }}\" {% if article.imageAltText is not empty %}alt=\"{{ article.imageAltText }}\"{% endif %} /></a>
  180.                                     </div>
  181.                                 {% endif %}
  182.                                 <div class=\"event-caption c-{{ count }}\">
  183.                                     <h3 class=\"event-title\">{{ article.title }}</h3>
  184.                                     <div class=\"event-text\">
  185.                                         <p>
  186.                                             {{ article.summary|slice(0,70)|replace_url|raw }}
  187.                                         </p>
  188.                                     </div>
  189.                                     <div class=\"event-footer\">
  190.                                         <a href=\"{{ articlenode.url }}\">Lire plus</a>
  191.                                     </div>
  192.                                 </div>
  193.                             </div>
  194.                         </div>
  195.                         {% set count = count + 1 %}
  196.                     {% endfor %}
  197.                 </div>
  198.                 <div class=\"row\">
  199.                     <div class=\"col a-plus\">
  200.                         {% set newsPageNode = nodemenu.getNodeByInternalName('news') %}
  201.                         <a href=\"{{ path('_slug', { 'url': newsPageNode.slug }) }}\">Plus de news</a>
  202.                     </div>
  203.                 </div>
  204.         </div>
  205.     </section>
  206. {% endif %}""Layout/_news.html.twig""/home/u363484990/domains/iut-udc.online/public_html/templates/Layout/_news.html.twig");
  207.     }
  208. }