var/cache/dev/asus-merchandising.dtv-projects.com/twig/95/957b43d83e002a3c41f786ae084ec056.php line 54

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/common/document.html.twig */
  16. class __TwigTemplate_1ef3217276f4e18d99451b3e08d5d470 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. 'title' => [$this, 'block_title'],
  29. 'content' => [$this, 'block_content'],
  30. ];
  31. }
  32. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33. {
  34. // line 1
  35. return "front/blank_layout.html.twig";
  36. }
  37. protected function doDisplay(array $context, array $blocks = []): iterable
  38. {
  39. $macros = $this->macros;
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/common/document.html.twig"));
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/common/document.html.twig"));
  44. $this->parent = $this->load("front/blank_layout.html.twig", 1);
  45. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  46. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  48. }
  49. // line 4
  50. /**
  51. * @return iterable<null|scalar|\Stringable>
  52. */
  53. public function block_title(array $context, array $blocks = []): iterable
  54. {
  55. $macros = $this->macros;
  56. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  58. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  60. // line 5
  61. yield "\t";
  62. if (CoreExtension::getAttribute($this->env, $this->source, ($context["document"] ?? null), "title", [], "any", true, true, false, 5)) {
  63. // line 6
  64. yield "\t\t";
  65. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 6, $this->source); })()), "title", [], "any", false, false, false, 6), "html", null, true);
  66. yield "
  67. \t";
  68. }
  69. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  70. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  71. yield from [];
  72. }
  73. // line 11
  74. /**
  75. * @return iterable<null|scalar|\Stringable>
  76. */
  77. public function block_content(array $context, array $blocks = []): iterable
  78. {
  79. $macros = $this->macros;
  80. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  81. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  82. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  83. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  84. // line 12
  85. yield "\t";
  86. if ((($tmp = Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 12, $this->source); })()))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  87. // line 13
  88. yield "\t\t";
  89. if (((null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 13, $this->source); })()), "value", [], "any", false, false, false, 13)) && (null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 13, $this->source); })()), "title", [], "any", false, false, false, 13)))) {
  90. // line 14
  91. yield "\t\t\t<div class=\"text-center mb-5\">
  92. \t\t\t\t<h2 class=\"text-uppercase\">
  93. \t\t\t\t\tLe document n'est pas disponible
  94. \t\t\t\t</h2>
  95. \t\t\t</div>
  96. \t\t\t";
  97. } else {
  98. // line 20
  99. yield "\t\t\t\t";
  100. if ((($tmp = !(null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 20, $this->source); })()), "fileName", [], "any", false, false, false, 20))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  101. // line 21
  102. yield "\t\t\t\t\t<div class=\"document-file\" data-slug=\"";
  103. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 21, $this->source); })()), "slug", [], "any", false, false, false, 21), "html", null, true);
  104. yield "\"></div>
  105. \t\t\t\t";
  106. }
  107. // line 23
  108. yield "\t\t\t\t";
  109. if ((($tmp = !(null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 23, $this->source); })()), "title", [], "any", false, false, false, 23))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  110. // line 24
  111. yield "\t\t\t\t\t<div class=\"text-center mb-5\">
  112. \t\t\t\t\t\t<h2 class=\"text-uppercase\">
  113. \t\t\t\t\t\t\t";
  114. // line 26
  115. yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 26, $this->source); })()), "title", [], "any", false, false, false, 26);
  116. yield "
  117. \t\t\t\t\t\t</h2>
  118. \t\t\t\t\t</div>
  119. \t\t\t\t";
  120. } else {
  121. // line 30
  122. yield "\t\t\t\t\t<div class=\"text-center mb-5\">
  123. \t\t\t\t\t\t<h2 class=\"text-uppercase\">
  124. \t\t\t\t\t\t\tLe document n'a pas de titre
  125. \t\t\t\t\t\t</h2>
  126. \t\t\t\t\t</div>
  127. \t\t\t\t";
  128. }
  129. // line 36
  130. yield "\t\t\t\t<div class=\"text-justify\">
  131. \t\t\t\t\t";
  132. // line 37
  133. if ((($tmp = !(null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 37, $this->source); })()), "value", [], "any", false, false, false, 37))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  134. // line 38
  135. yield "\t\t\t\t\t\t";
  136. yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 38, $this->source); })()), "value", [], "any", false, false, false, 38);
  137. yield "
  138. \t\t\t\t\t";
  139. } else {
  140. // line 40
  141. yield "\t\t\t\t\t\t<h3>
  142. \t\t\t\t\t\t\tLe document n'a pas de contenu
  143. \t\t\t\t\t\t</h3>
  144. \t\t\t\t\t";
  145. }
  146. // line 44
  147. yield "\t\t\t\t</div>
  148. \t\t";
  149. }
  150. // line 46
  151. yield "\t";
  152. }
  153. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  154. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  155. yield from [];
  156. }
  157. /**
  158. * @codeCoverageIgnore
  159. */
  160. public function getTemplateName(): string
  161. {
  162. return "front/common/document.html.twig";
  163. }
  164. /**
  165. * @codeCoverageIgnore
  166. */
  167. public function isTraitable(): bool
  168. {
  169. return false;
  170. }
  171. /**
  172. * @codeCoverageIgnore
  173. */
  174. public function getDebugInfo(): array
  175. {
  176. return array ( 174 => 46, 170 => 44, 164 => 40, 158 => 38, 156 => 37, 153 => 36, 145 => 30, 138 => 26, 134 => 24, 131 => 23, 125 => 21, 122 => 20, 114 => 14, 111 => 13, 108 => 12, 95 => 11, 80 => 6, 77 => 5, 64 => 4, 41 => 1,);
  177. }
  178. public function getSourceContext(): Source
  179. {
  180. return new Source("{% extends 'front/blank_layout.html.twig' %}
  181. {% block title %}
  182. \t{% if document.title is defined %}
  183. \t\t{{ document.title }}
  184. \t{% endif %}
  185. {% endblock %}
  186. {% block content %}
  187. \t{% if document|length %}
  188. \t\t{% if document.value is null and document.title is null %}
  189. \t\t\t<div class=\"text-center mb-5\">
  190. \t\t\t\t<h2 class=\"text-uppercase\">
  191. \t\t\t\t\tLe document n'est pas disponible
  192. \t\t\t\t</h2>
  193. \t\t\t</div>
  194. \t\t\t{% else %}
  195. \t\t\t\t{% if document.fileName is not null %}
  196. \t\t\t\t\t<div class=\"document-file\" data-slug=\"{{ document.slug }}\"></div>
  197. \t\t\t\t{% endif %}
  198. \t\t\t\t{% if document.title is not null %}
  199. \t\t\t\t\t<div class=\"text-center mb-5\">
  200. \t\t\t\t\t\t<h2 class=\"text-uppercase\">
  201. \t\t\t\t\t\t\t{{ document.title|raw }}
  202. \t\t\t\t\t\t</h2>
  203. \t\t\t\t\t</div>
  204. \t\t\t\t{% else %}
  205. \t\t\t\t\t<div class=\"text-center mb-5\">
  206. \t\t\t\t\t\t<h2 class=\"text-uppercase\">
  207. \t\t\t\t\t\t\tLe document n'a pas de titre
  208. \t\t\t\t\t\t</h2>
  209. \t\t\t\t\t</div>
  210. \t\t\t\t{% endif %}
  211. \t\t\t\t<div class=\"text-justify\">
  212. \t\t\t\t\t{% if document.value is not null %}
  213. \t\t\t\t\t\t{{ document.value|raw }}
  214. \t\t\t\t\t{% else %}
  215. \t\t\t\t\t\t<h3>
  216. \t\t\t\t\t\t\tLe document n'a pas de contenu
  217. \t\t\t\t\t\t</h3>
  218. \t\t\t\t\t{% endif %}
  219. \t\t\t\t</div>
  220. \t\t{% endif %}
  221. \t{% endif %}
  222. {% endblock %}
  223. ", "front/common/document.html.twig", "/var/www/dtv-preprod/current/templates/front/common/document.html.twig");
  224. }
  225. }