var/cache/dev/twig/9a/9ad41d13eca07ec1ef4364037be80ee5.php line 39

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. /* article/show.html.twig */
  14. class __TwigTemplate_cf165116bffa52d57eb19d34b1192bbd 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.             'title' => [$this'block_title'],
  24.             'body' => [$this'block_body'],
  25.         ];
  26.     }
  27.     protected function doGetParent(array $context)
  28.     {
  29.         // line 1
  30.         return "base.html.twig";
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""article/show.html.twig"));
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""article/show.html.twig"));
  39.         $this->parent $this->loadTemplate("base.html.twig""article/show.html.twig"1);
  40.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  41.         
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  43.         
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  45.     }
  46.     // line 3
  47.     public function block_title($context, array $blocks = [])
  48.     {
  49.         $macros $this->macros;
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  54.         // line 4
  55.         echo "\t";
  56.         if (array_key_exists("title"$context)) {
  57.             // line 5
  58.             echo "\t\t";
  59.             echo twig_escape_filter($this->envtwig_replace_filter((isset($context["title"]) || array_key_exists("title"$context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.'5$this->source); })()), ["<br>" => ""]), "html"nulltrue);
  60.             echo "
  61. \t";
  62.         } else {
  63.             // line 7
  64.             echo "\t\t";
  65.             echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'7$this->source); })()), "title", [], "any"falsefalsefalse7), ["<br>" => ""]), "html"nulltrue);
  66.             echo "
  67. \t";
  68.         }
  69.         
  70.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  71.         
  72.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  73.     }
  74.     // line 11
  75.     public function block_body($context, array $blocks = [])
  76.     {
  77.         $macros $this->macros;
  78.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  79.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  80.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  81.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  82.         // line 12
  83.         echo "\t<div class=\"titre\">
  84. \t\t<h1>";
  85.         // line 13
  86.         echo twig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'13$this->source); })()), "title", [], "any"falsefalsefalse13);
  87.         echo "</h1>
  88. \t</div>
  89. \t";
  90.         // line 15
  91.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_EDITOR")) {
  92.             // line 16
  93.             echo "\t\t";
  94.             $context["url"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$this->extensions['EasyCorp\Bundle\EasyAdminBundle\Twig\EasyAdminTwigExtension']->getAdminUrlGenerator(), "setController", ["App\\Controller\\Admin\\ArticleCrudController"], "method"falsefalsefalse16), "setAction", ["edit"], "method"falsefalsefalse17), "setEntityId", [twig_get_attribute($this->env$this->source,             // line 19
  95. (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'19$this->source); })()), "id", [], "any"falsefalsefalse19)], "method"falsefalsefalse18);
  96.             // line 20
  97.             echo "\t\t<p>
  98.             <a class=\"adm-link\" href=\"";
  99.             // line 21
  100.             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.'21$this->source); })()), "html"nulltrue);
  101.             echo "\" target=\"_blank\">administrer l'article</a><br>
  102.             ";
  103.             // line 22
  104.             if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_SUPER_ADMIN")) {
  105.                 echo "<strong>tmpOldIds:";
  106.                 echo twig_escape_filter($this->envtwig_join_filter(twig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'22$this->source); })()), "tmpOldIds", [], "any"falsefalsefalse22), ","), "html"nulltrue);
  107.                 echo "</strong>";
  108.             }
  109.             // line 23
  110.             echo "        </p>
  111. \t";
  112.         }
  113.         // line 25
  114.         echo "
  115.     <div class=\"container\">
  116.         <div class=\"date\">
  117.             ";
  118.         // line 28
  119.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'28$this->source); })()), "createdAt", [], "any"falsefalsefalse28), "d/m/Y"), "html"nulltrue);
  120.         echo "
  121.         </div>
  122.         
  123.         ";
  124.         // line 31
  125.         $this->loadTemplate("media/postMedias.html.twig""article/show.html.twig"31)->display(twig_array_merge($context, ["medias" => twig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'31$this->source); })()), "medias", [], "any"falsefalsefalse31), "mediasType" => "slides"]));
  126.         // line 32
  127.         echo "
  128.         ";
  129.         // line 33
  130.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'33$this->source); })()), "chapo", [], "any"falsefalsefalse33)) > 5)) {
  131.             // line 34
  132.             echo "            <div class=\"chapo\">
  133.                 ";
  134.             // line 35
  135.             echo twig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'35$this->source); })()), "chapo", [], "any"falsefalsefalse35);
  136.             echo "
  137.             </div>
  138.         ";
  139.         }
  140.         // line 38
  141.         echo "        
  142.         ";
  143.         // line 40
  144.         $context["hideThumbnails"] = false;
  145.         $context['_parent'] = $context;
  146.         $context['_seq'] = twig_ensure_traversable(twig_array_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'40$this->source); })()), "medias", [], "any"falsefalsefalse40), function ($__media__) use ($context$macros) { $context["media"] = $__media__; return (twig_get_attribute($this->env$this->source$context["media"], "role", [], "any"falsefalsefalse40) == "slide"); }));
  147.         foreach ($context['_seq'] as $context["_key"] => $context["media"]) {
  148.             $context["hideThumbnails"] = true;
  149.         }
  150.         $_parent $context['_parent'];
  151.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['media'], $context['_parent'], $context['loop']);
  152.         $context array_intersect_key($context$_parent) + $_parent;
  153.         // line 41
  154.         echo "        ";
  155.         if ( !(isset($context["hideThumbnails"]) || array_key_exists("hideThumbnails"$context) ? $context["hideThumbnails"] : (function () { throw new RuntimeError('Variable "hideThumbnails" does not exist.'41$this->source); })())) {
  156.             $this->loadTemplate("media/postMedias.html.twig""article/show.html.twig"41)->display(twig_array_merge($context, ["medias" => twig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'41$this->source); })()), "medias", [], "any"falsefalsefalse41), "mediasType" => "thumbnails"]));
  157.         }
  158.         // line 42
  159.         echo "        
  160.         
  161.         <div class=\"contenu\">
  162.             ";
  163.         // line 46
  164.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_SUPER_ADMIN")) {
  165.             echo "<strong>tmpOldIds:";
  166.             echo twig_escape_filter($this->envtwig_join_filter(twig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'46$this->source); })()), "tmpOldIds", [], "any"falsefalsefalse46), ","), "html"nulltrue);
  167.             echo "</strong><br><br>";
  168.         }
  169.         // line 47
  170.         echo "            ";
  171.         echo twig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'47$this->source); })()), "content", [], "any"falsefalsefalse47);
  172.         echo "
  173.         </div>
  174.         ";
  175.         // line 50
  176.         $this->loadTemplate("media/postMedias.html.twig""article/show.html.twig"50)->display(twig_array_merge($context, ["medias" => twig_get_attribute($this->env$this->source, (isset($context["article"]) || array_key_exists("article"$context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.'50$this->source); })()), "medias", [], "any"falsefalsefalse50), "mediasType" => "documents"]));
  177.         // line 51
  178.         echo "\t</div>
  179. ";
  180.         
  181.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  182.         
  183.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  184.     }
  185.     public function getTemplateName()
  186.     {
  187.         return "article/show.html.twig";
  188.     }
  189.     public function isTraitable()
  190.     {
  191.         return false;
  192.     }
  193.     public function getDebugInfo()
  194.     {
  195.         return array (  200 => 51,  198 => 50,  191 => 47,  185 => 46,  179 => 42,  174 => 41,  164 => 40,  160 => 38,  154 => 35,  151 => 34,  149 => 33,  146 => 32,  144 => 31,  138 => 28,  133 => 25,  129 => 23,  123 => 22,  119 => 21,  116 => 20,  114 => 19,  112 => 16,  110 => 15,  105 => 13,  102 => 12,  92 => 11,  78 => 7,  72 => 5,  69 => 4,  59 => 3,  36 => 1,);
  196.     }
  197.     public function getSourceContext()
  198.     {
  199.         return new Source("{% extends 'base.html.twig' %}
  200. {% block title %}
  201. \t{% if title is defined %}
  202. \t\t{{ title|replace({ '<br>':'' }) }}
  203. \t{% else %}
  204. \t\t{{ article.title|replace({ '<br>':'' }) }}
  205. \t{% endif %}
  206. {% endblock %}
  207. {% block body %}
  208. \t<div class=\"titre\">
  209. \t\t<h1>{{ article.title|raw }}</h1>
  210. \t</div>
  211. \t{% if is_granted('ROLE_EDITOR') %}
  212. \t\t{% set url = ea_url()
  213. \t\t\t.setController('App\\\\Controller\\\\Admin\\\\ArticleCrudController')
  214. \t\t\t.setAction('edit')
  215. \t\t\t.setEntityId(article.id) %}
  216. \t\t<p>
  217.             <a class=\"adm-link\" href=\"{{ url }}\" target=\"_blank\">administrer l'article</a><br>
  218.             {% if is_granted('ROLE_SUPER_ADMIN') %}<strong>tmpOldIds:{{ article.tmpOldIds|join(\",\") }}</strong>{% endif %}
  219.         </p>
  220. \t{% endif %}
  221.     <div class=\"container\">
  222.         <div class=\"date\">
  223.             {{article.createdAt|date(\"d/m/Y\")}}
  224.         </div>
  225.         
  226.         {% include 'media/postMedias.html.twig' with {'medias': article.medias, 'mediasType': 'slides' } %}
  227.         {% if article.chapo|length > 5 %}
  228.             <div class=\"chapo\">
  229.                 {{ article.chapo|raw }}
  230.             </div>
  231.         {% endif %}
  232.         
  233.         {% set hideThumbnails = false %}{% for media in article.medias|filter(media => media.role == \"slide\") %}{% set hideThumbnails = true %}{% endfor %}{# car icig ne veut pas de thumbnail s'il y a des slides #}
  234.         {% if not hideThumbnails %}{% include 'media/postMedias.html.twig' with {'medias': article.medias, 'mediasType': 'thumbnails' } %}{% endif %}
  235.         
  236.         
  237.         <div class=\"contenu\">
  238.             {% if is_granted('ROLE_SUPER_ADMIN') %}<strong>tmpOldIds:{{ article.tmpOldIds|join(\",\") }}</strong><br><br>{% endif %}
  239.             {{ article.content|raw }}
  240.         </div>
  241.         {% include 'media/postMedias.html.twig' with {'medias': article.medias, 'mediasType': 'documents' } %}
  242. \t</div>
  243. {% endblock %}
  244. ""article/show.html.twig""/home/ovow2306/public_html/ici-grenoble/ici-gre-back-dev/templates/article/show.html.twig");
  245.     }
  246. }