var/cache/dev/twig/3e/3e87715b77a07e3e4951caec339f1104.php line 49

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. /* page/show.html.twig */
  14. class __TwigTemplate_e833b8d467265a17af3b45961a238ca3 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""page/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""page/show.html.twig"));
  39.         $this->parent $this->loadTemplate("base.html.twig""page/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.         echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'3$this->source); })()), "title", [], "any"falsefalsefalse3), ["<br>" => ""]), "html"nulltrue);
  55.         
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  57.         
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  59.     }
  60.     // line 5
  61.     public function block_body($context, array $blocks = [])
  62.     {
  63.         $macros $this->macros;
  64.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  65.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  66.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  67.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  68.         // line 6
  69.         echo "\t<div class=\"titre\">
  70. \t\t<h1>";
  71.         // line 7
  72.         echo twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'7$this->source); })()), "title", [], "any"falsefalsefalse7);
  73.         echo "</h1>
  74. \t</div>
  75. \t";
  76.         // line 9
  77.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_EDITOR")) {
  78.             // line 10
  79.             echo "\t\t";
  80.             $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\\PageCrudController"], "method"falsefalsefalse10), "setAction", ["edit"], "method"falsefalsefalse11), "setEntityId", [twig_get_attribute($this->env$this->source,             // line 13
  81. (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'13$this->source); })()), "id", [], "any"falsefalsefalse13)], "method"falsefalsefalse12);
  82.             // line 14
  83.             echo "\t\t<p><a class=\"adm-link\" href=\"";
  84.             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.'14$this->source); })()), "html"nulltrue);
  85.             echo "\" target=\"_blank\">administrer la page</a></p>
  86. \t";
  87.         }
  88.         // line 16
  89.         echo "\t";
  90.         // line 19
  91.         echo "\t";
  92.         if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'19$this->source); })()), "medias", [], "any"falsefalsefalse19))) {
  93.             // line 20
  94.             echo "\t\t<div class=\"article medias\">
  95. \t\t\t";
  96.             // line 21
  97.             $this->loadTemplate("media/postMedias.html.twig""page/show.html.twig"21)->display(twig_array_merge($context, ["post" => (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'21$this->source); })())]));
  98.             // line 22
  99.             echo "\t\t</div>
  100. \t";
  101.         }
  102.         // line 24
  103.         echo "
  104.     ";
  105.         // line 25
  106.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'25$this->source); })()), "chapo", [], "any"falsefalsefalse25)) > 5)) {
  107.             // line 26
  108.             echo "        <div class=\"chapo\">
  109.             ";
  110.             // line 27
  111.             echo twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'27$this->source); })()), "chapo", [], "any"falsefalsefalse27);
  112.             echo "
  113.         </div>
  114.     ";
  115.         }
  116.         // line 30
  117.         echo "\t
  118. \t<div class=\"contenu\">
  119. \t\t";
  120.         // line 32
  121.         echo twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'32$this->source); })()), "content", [], "any"falsefalsefalse32);
  122.         echo "
  123. \t</div>
  124. ";
  125.         
  126.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  127.         
  128.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  129.     }
  130.     public function getTemplateName()
  131.     {
  132.         return "page/show.html.twig";
  133.     }
  134.     public function isTraitable()
  135.     {
  136.         return false;
  137.     }
  138.     public function getDebugInfo()
  139.     {
  140.         return array (  140 => 32,  136 => 30,  130 => 27,  127 => 26,  125 => 25,  122 => 24,  118 => 22,  116 => 21,  113 => 20,  110 => 19,  108 => 16,  102 => 14,  100 => 13,  98 => 10,  96 => 9,  91 => 7,  88 => 6,  78 => 5,  59 => 3,  36 => 1,);
  141.     }
  142.     public function getSourceContext()
  143.     {
  144.         return new Source("{% extends 'base.html.twig' %}
  145. {% block title %}{{ page.title|replace({ '<br>':'' }) }}{% endblock %}
  146. {% block body %}
  147. \t<div class=\"titre\">
  148. \t\t<h1>{{ page.title|raw }}</h1>
  149. \t</div>
  150. \t{% if is_granted('ROLE_EDITOR') %}
  151. \t\t{% set url = ea_url()
  152. \t\t\t.setController('App\\\\Controller\\\\Admin\\\\PageCrudController')
  153. \t\t\t.setAction('edit')
  154. \t\t\t.setEntityId(page.id) %}
  155. \t\t<p><a class=\"adm-link\" href=\"{{ url }}\" target=\"_blank\">administrer la page</a></p>
  156. \t{% endif %}
  157. \t{# <div class=\"date\">
  158. \t\t{{page.createdAt|date(\"d/m/Y\")}}
  159. \t</div> #}
  160. \t{% if page.medias is not empty %}
  161. \t\t<div class=\"article medias\">
  162. \t\t\t{% include 'media/postMedias.html.twig' with {'post': page } %}
  163. \t\t</div>
  164. \t{% endif %}
  165.     {% if page.chapo|length > 5 %}
  166.         <div class=\"chapo\">
  167.             {{ page.chapo|raw }}
  168.         </div>
  169.     {% endif %}
  170. \t
  171. \t<div class=\"contenu\">
  172. \t\t{{ page.content|raw }}
  173. \t</div>
  174. {% endblock %}
  175. ""page/show.html.twig""/home/ovow2306/public_html/ici-grenoble/ici-gre-back-dev/templates/page/show.html.twig");
  176.     }
  177. }