<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* front/common/document.html.twig */
class __TwigTemplate_1ef3217276f4e18d99451b3e08d5d470 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "front/blank_layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/common/document.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/common/document.html.twig"));
$this->parent = $this->load("front/blank_layout.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 4
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
// line 5
yield "\t";
if (CoreExtension::getAttribute($this->env, $this->source, ($context["document"] ?? null), "title", [], "any", true, true, false, 5)) {
// line 6
yield "\t\t";
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);
yield "
\t";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 11
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 12
yield "\t";
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)) {
// line 13
yield "\t\t";
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)))) {
// line 14
yield "\t\t\t<div class=\"text-center mb-5\">
\t\t\t\t<h2 class=\"text-uppercase\">
\t\t\t\t\tLe document n'est pas disponible
\t\t\t\t</h2>
\t\t\t</div>
\t\t\t";
} else {
// line 20
yield "\t\t\t\t";
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)) {
// line 21
yield "\t\t\t\t\t<div class=\"document-file\" data-slug=\"";
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);
yield "\"></div>
\t\t\t\t";
}
// line 23
yield "\t\t\t\t";
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)) {
// line 24
yield "\t\t\t\t\t<div class=\"text-center mb-5\">
\t\t\t\t\t\t<h2 class=\"text-uppercase\">
\t\t\t\t\t\t\t";
// line 26
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);
yield "
\t\t\t\t\t\t</h2>
\t\t\t\t\t</div>
\t\t\t\t";
} else {
// line 30
yield "\t\t\t\t\t<div class=\"text-center mb-5\">
\t\t\t\t\t\t<h2 class=\"text-uppercase\">
\t\t\t\t\t\t\tLe document n'a pas de titre
\t\t\t\t\t\t</h2>
\t\t\t\t\t</div>
\t\t\t\t";
}
// line 36
yield "\t\t\t\t<div class=\"text-justify\">
\t\t\t\t\t";
// line 37
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)) {
// line 38
yield "\t\t\t\t\t\t";
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);
yield "
\t\t\t\t\t";
} else {
// line 40
yield "\t\t\t\t\t\t<h3>
\t\t\t\t\t\t\tLe document n'a pas de contenu
\t\t\t\t\t\t</h3>
\t\t\t\t\t";
}
// line 44
yield "\t\t\t\t</div>
\t\t";
}
// line 46
yield "\t";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "front/common/document.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'front/blank_layout.html.twig' %}
{% block title %}
\t{% if document.title is defined %}
\t\t{{ document.title }}
\t{% endif %}
{% endblock %}
{% block content %}
\t{% if document|length %}
\t\t{% if document.value is null and document.title is null %}
\t\t\t<div class=\"text-center mb-5\">
\t\t\t\t<h2 class=\"text-uppercase\">
\t\t\t\t\tLe document n'est pas disponible
\t\t\t\t</h2>
\t\t\t</div>
\t\t\t{% else %}
\t\t\t\t{% if document.fileName is not null %}
\t\t\t\t\t<div class=\"document-file\" data-slug=\"{{ document.slug }}\"></div>
\t\t\t\t{% endif %}
\t\t\t\t{% if document.title is not null %}
\t\t\t\t\t<div class=\"text-center mb-5\">
\t\t\t\t\t\t<h2 class=\"text-uppercase\">
\t\t\t\t\t\t\t{{ document.title|raw }}
\t\t\t\t\t\t</h2>
\t\t\t\t\t</div>
\t\t\t\t{% else %}
\t\t\t\t\t<div class=\"text-center mb-5\">
\t\t\t\t\t\t<h2 class=\"text-uppercase\">
\t\t\t\t\t\t\tLe document n'a pas de titre
\t\t\t\t\t\t</h2>
\t\t\t\t\t</div>
\t\t\t\t{% endif %}
\t\t\t\t<div class=\"text-justify\">
\t\t\t\t\t{% if document.value is not null %}
\t\t\t\t\t\t{{ document.value|raw }}
\t\t\t\t\t{% else %}
\t\t\t\t\t\t<h3>
\t\t\t\t\t\t\tLe document n'a pas de contenu
\t\t\t\t\t\t</h3>
\t\t\t\t\t{% endif %}
\t\t\t\t</div>
\t\t{% endif %}
\t{% endif %}
{% endblock %}
", "front/common/document.html.twig", "/var/www/dtv-preprod/current/templates/front/common/document.html.twig");
}
}