var/cache/dev/twig/be/bead87aefe9b776756b1eaa33cde6454.php line 45

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