var/cache/dev/twig/ce/ce2a9025c6ecd5a889edd1bad9def033f55d71f264fd0ec1d6a96e0c3ce0bac3.php line 48

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. /* news/detail.html.twig */
  14. class __TwigTemplate_a71048fa357a5bda9d84c2d05040512b7eeb41604891048917a9422d8cd066a0 extends 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->blocks = [
  23.             'content' => [$this'block_content'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "layout.html.twig";
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/detail.html.twig"));
  36.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""news/detail.html.twig"));
  38.         $this->parent $this->loadTemplate("layout.html.twig""news/detail.html.twig"1);
  39.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  40.         
  41.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  42.         
  43.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  44.     }
  45.     // line 3
  46.     public function block_content($context, array $blocks = [])
  47.     {
  48.         $macros $this->macros;
  49.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  51.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  53.         // line 4
  54.         echo "
  55. <main id=\"main\" role=\"main\">
  56.     <div class=\"apk-news-detail\">
  57.         <div class=\"uk-container\">
  58.             ";
  59.         // line 9
  60.         if (((isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'9$this->source); })()) == false)) {
  61.             // line 10
  62.             echo "            <div class=\"uk-alert-danger\" uk-alert>
  63.                 <p>";
  64.             // line 11
  65.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Aucune news ne correspond à l'url suivante : "), "html"nulltrue);
  66.             echo " ";
  67.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'11$this->source); })()), "request", [], "any"falsefalsefalse11), "getUri", [], "method"falsefalsefalse11), "html"nulltrue);
  68.             echo "</p>
  69.             </div>
  70.                 
  71.             ";
  72.         } else {
  73.             // line 15
  74.             echo "
  75.             <div>
  76.                 <div class=\"apk-news-detail-container\">
  77.                     <div class=\"apk-media uk-cover-container\">
  78.                         <a href=\"";
  79.             // line 19
  80.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsDetail", ["slug" => twig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'19$this->source); })()), "getSlug", [], "method"falsefalsefalse19)]), "html"nulltrue);
  81.             echo "\">
  82.                             <img class=\"uk-cover\" uk-cover src=\"";
  83.             // line 20
  84.             echo twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'20$this->source); })()), "getImage", [], "method"falsefalsefalse20), "getThumbnail", [=> "news-background"], "method"falsefalsefalse20);
  85.             echo "\" alt=\"";
  86.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'20$this->source); })()), "getTitle", [], "method"falsefalsefalse20), "html"nulltrue);
  87.             echo "\">
  88.                         </a>
  89.                     </div>
  90.                     <div class=\"apk-content uk-margin-medium-top\">
  91.                         <h1 class=\"uk-h2\">";
  92.             // line 24
  93.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'24$this->source); })()), "getTitle", [], "method"falsefalsefalse24), "html"nulltrue);
  94.             echo "</h1>
  95.                         <span class=\"apk-date \">
  96.                             ";
  97.             // line 26
  98.             echo twig_escape_filter($this->env$this->extensions['App\Twig\Extension\Apik']->convertDate(twig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'26$this->source); })()), "getPublishDate", [], "method"falsefalsefalse26), "d F Y"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'26$this->source); })()), "request", [], "any"falsefalsefalse26), "locale", [], "any"falsefalsefalse26)), "html"nulltrue);
  99.             echo "
  100.                         </span>
  101.                         ";
  102.             // line 28
  103.             echo twig_get_attribute($this->env$this->source, (isset($context["news"]) || array_key_exists("news"$context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.'28$this->source); })()), "getContent", [], "method"falsefalsefalse28);
  104.             echo "
  105.                     </div>
  106.                 </div>
  107.             </div>
  108.         ";
  109.         }
  110.         // line 34
  111.         echo "
  112.             <div class=\"uk-margin-medium-top\">
  113.                 <a class=\"uk-flex uk-flex-left uk-flex-middle\" href=\"";
  114.         // line 36
  115.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("newsList");
  116.         echo "\">
  117.                     <img uk-svg class=\"uk-margin-small-right\" width=\"20\" height=\"20\" src=\"/static/img/pictos/arrow-left.svg\" alt=\"";
  118.         // line 37
  119.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Rertour"), "html"nulltrue);
  120.         echo "\">
  121.                     ";
  122.         // line 38
  123.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Rertour aux news"), "html"nulltrue);
  124.         echo "
  125.                 </a>
  126.             </div>
  127.         </div>
  128.     </div>
  129. </main>
  130. ";
  131.         
  132.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  133.         
  134.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  135.     }
  136.     public function getTemplateName()
  137.     {
  138.         return "news/detail.html.twig";
  139.     }
  140.     public function isTraitable()
  141.     {
  142.         return false;
  143.     }
  144.     public function getDebugInfo()
  145.     {
  146.         return array (  139 => 38,  135 => 37,  131 => 36,  127 => 34,  118 => 28,  113 => 26,  108 => 24,  99 => 20,  95 => 19,  89 => 15,  80 => 11,  77 => 10,  75 => 9,  68 => 4,  58 => 3,  35 => 1,);
  147.     }
  148.     public function getSourceContext()
  149.     {
  150.         return new Source("{% extends 'layout.html.twig' %}
  151. {% block content %}
  152. <main id=\"main\" role=\"main\">
  153.     <div class=\"apk-news-detail\">
  154.         <div class=\"uk-container\">
  155.             {% if news == false %}
  156.             <div class=\"uk-alert-danger\" uk-alert>
  157.                 <p>{{ \"Aucune news ne correspond à l'url suivante : \"|trans }} {{  app.request.getUri() }}</p>
  158.             </div>
  159.                 
  160.             {% else %}
  161.             <div>
  162.                 <div class=\"apk-news-detail-container\">
  163.                     <div class=\"apk-media uk-cover-container\">
  164.                         <a href=\"{{path('newsDetail', {\"slug\":news.getSlug()})}}\">
  165.                             <img class=\"uk-cover\" uk-cover src=\"{{news.getImage().getThumbnail('news-background')| raw}}\" alt=\"{{ news.getTitle() }}\">
  166.                         </a>
  167.                     </div>
  168.                     <div class=\"apk-content uk-margin-medium-top\">
  169.                         <h1 class=\"uk-h2\">{{news.getTitle()}}</h1>
  170.                         <span class=\"apk-date \">
  171.                             {{ convert_date(news.getPublishDate(), 'd F Y', app.request.locale) }}
  172.                         </span>
  173.                         {{news.getContent() |raw}}
  174.                     </div>
  175.                 </div>
  176.             </div>
  177.         {% endif %}
  178.             <div class=\"uk-margin-medium-top\">
  179.                 <a class=\"uk-flex uk-flex-left uk-flex-middle\" href=\"{{ path('newsList') }}\">
  180.                     <img uk-svg class=\"uk-margin-small-right\" width=\"20\" height=\"20\" src=\"/static/img/pictos/arrow-left.svg\" alt=\"{{ \"Rertour\"|trans }}\">
  181.                     {{ \"Rertour aux news\"|trans }}
  182.                 </a>
  183.             </div>
  184.         </div>
  185.     </div>
  186. </main>
  187. {%  endblock %}
  188. ""news/detail.html.twig""/var/www/mynursery.apik-pp.be/www/templates/news/detail.html.twig");
  189.     }
  190. }