var/cache/dev/twig/04/04b40586ce8edfaff03e6ae4b8daa81a.php line 51

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. /* front/cms/page.html.twig */
  15. class __TwigTemplate_9c99c8dfbc257ce8fbc80372873ba5c8 extends Template
  16. {
  17. private $source;
  18. private $macros = [];
  19. public function __construct(Environment $env)
  20. {
  21. parent::__construct($env);
  22. $this->source = $this->getSourceContext();
  23. $this->blocks = [
  24. 'metas' => [$this, 'block_metas'],
  25. 'breadcrumbs' => [$this, 'block_breadcrumbs'],
  26. 'content' => [$this, 'block_content'],
  27. ];
  28. }
  29. protected function doGetParent(array $context)
  30. {
  31. // line 1
  32. return "front/front.html.twig";
  33. }
  34. protected function doDisplay(array $context, array $blocks = [])
  35. {
  36. $macros = $this->macros;
  37. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/cms/page.html.twig"));
  39. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/cms/page.html.twig"));
  41. $this->parent = $this->loadTemplate("front/front.html.twig", "front/cms/page.html.twig", 1);
  42. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  43. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  45. }
  46. // line 3
  47. public function block_metas($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", "metas"));
  52. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  53. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metas"));
  54. // line 4
  55. yield " <title>";
  56. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pageDescription"]) || array_key_exists("pageDescription", $context) ? $context["pageDescription"] : (function () { throw new RuntimeError('Variable "pageDescription" does not exist.', 4, $this->source); })()), "metaTitle", [], "any", false, false, false, 4), "html", null, true);
  57. yield "</title>
  58. <meta property=\"og:description\" content=\"";
  59. // line 5
  60. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pageDescription"]) || array_key_exists("pageDescription", $context) ? $context["pageDescription"] : (function () { throw new RuntimeError('Variable "pageDescription" does not exist.', 5, $this->source); })()), "metaDescription", [], "any", false, false, false, 5), "html", null, true);
  61. yield "\">
  62. <link rel=\"canonical\" href=\"";
  63. // line 6
  64. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("page", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "id", [], "any", false, false, false, 6), "url" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "url", [], "any", false, false, false, 6)]), "html", null, true);
  65. yield "\" />
  66. ";
  67. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  68. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  69. return; yield '';
  70. }
  71. // line 9
  72. public function block_breadcrumbs($context, array $blocks = [])
  73. {
  74. $macros = $this->macros;
  75. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  76. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
  77. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  78. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
  79. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  80. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  81. return; yield '';
  82. }
  83. // line 13
  84. public function block_content($context, array $blocks = [])
  85. {
  86. $macros = $this->macros;
  87. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  88. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  89. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  90. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  91. // line 14
  92. yield " <div class=\"ctn page-view\">
  93. ";
  94. // line 15
  95. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  96. // line 16
  97. yield " <div class=\"admin-tools\">
  98. <a href=\"";
  99. // line 17
  100. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_page", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 17, $this->source); })()), "id", [], "any", false, false, false, 17)]), "html", null, true);
  101. yield "\" class=\"admin-update\" target=\"_blank\">modifier la page</a>
  102. </div>
  103. ";
  104. }
  105. // line 20
  106. yield " <div class=\"title-ctn\">
  107. <h1 class=\"title\">";
  108. // line 21
  109. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pageDescription"]) || array_key_exists("pageDescription", $context) ? $context["pageDescription"] : (function () { throw new RuntimeError('Variable "pageDescription" does not exist.', 21, $this->source); })()), "title", [], "any", false, false, false, 21), "html", null, true);
  110. yield "</h1>
  111. <hr>
  112. </div>
  113. <div class=\"rte rte-content\">
  114. ";
  115. // line 25
  116. yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["pageDescription"]) || array_key_exists("pageDescription", $context) ? $context["pageDescription"] : (function () { throw new RuntimeError('Variable "pageDescription" does not exist.', 25, $this->source); })()), "body", [], "any", false, false, false, 25);
  117. yield "
  118. </div>
  119. </div>
  120. ";
  121. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  122. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  123. return; yield '';
  124. }
  125. /**
  126. * @codeCoverageIgnore
  127. */
  128. public function getTemplateName()
  129. {
  130. return "front/cms/page.html.twig";
  131. }
  132. /**
  133. * @codeCoverageIgnore
  134. */
  135. public function isTraitable()
  136. {
  137. return false;
  138. }
  139. /**
  140. * @codeCoverageIgnore
  141. */
  142. public function getDebugInfo()
  143. {
  144. return array ( 146 => 25, 139 => 21, 136 => 20, 130 => 17, 127 => 16, 125 => 15, 122 => 14, 112 => 13, 93 => 9, 80 => 6, 76 => 5, 71 => 4, 61 => 3, 38 => 1,);
  145. }
  146. public function getSourceContext()
  147. {
  148. return new Source("{% extends 'front/front.html.twig' %}
  149. {% block metas %}
  150. <title>{{ pageDescription.metaTitle }}</title>
  151. <meta property=\"og:description\" content=\"{{ pageDescription.metaDescription }}\">
  152. <link rel=\"canonical\" href=\"{{ url('page',{id:page.id, url:page.url}) }}\" />
  153. {% endblock %}
  154. {% block breadcrumbs %}
  155. {# {% include 'front/layout/breadcrumbs.html.twig' with {page:page.title} %}#}
  156. {% endblock %}
  157. {% block content %}
  158. <div class=\"ctn page-view\">
  159. {% if is_granted('ROLE_ADMIN') %}
  160. <div class=\"admin-tools\">
  161. <a href=\"{{ path('admin_page',{id:page.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier la page</a>
  162. </div>
  163. {% endif %}
  164. <div class=\"title-ctn\">
  165. <h1 class=\"title\">{{ pageDescription.title }}</h1>
  166. <hr>
  167. </div>
  168. <div class=\"rte rte-content\">
  169. {{ pageDescription.body|raw }}
  170. </div>
  171. </div>
  172. {% endblock %}", "front/cms/page.html.twig", "/var/www/dogcat.com/v2-test/templates/front/cms/page.html.twig");
  173. }
  174. }