<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\MacroNamespace;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Sandbox\SecurityNotAllowedTestError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* base.html.twig */
class __TwigTemplate_d25062949008879923fa671b299f36cb extends Template
{
private Source $source;
/**
* @var array<string, MacroNamespace>
*/
private array $macros = [];
private \Twig\Runtime\EscaperRuntime $escaper;
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->escaper = $env->getRuntime('Twig\Runtime\EscaperRuntime');
$this->parent = false;
$this->blocks = [
'title' => [$this, 'block_title'],
'stylesheets' => [$this, 'block_stylesheets'],
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
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", "base.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "base.html.twig"));
// line 1
yield "<!DOCTYPE html>
<html lang=\"fr\">
<head>
<meta charset=\"UTF-8\">
<title>";
// line 5
yield from $this->unwrap()->yieldBlock('title', $context, $blocks);
yield "</title>
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">
<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>
<link href=\"https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400;1,600;1,700;1,800;1,900&display=swap\" rel=\"stylesheet\">
";
// line 10
yield (string) $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("stylesheets");
yield "
";
// line 11
yield from $this->unwrap()->yieldBlock('stylesheets', $context, $blocks);
// line 12
yield "</head>
<body>
";
// line 15
$context["currentUserRoleModifier"] = null;
// line 16
yield "
";
// line 17
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 17, $this->source); })()), "user", [], "any", false, false, false, 17)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 18
yield " ";
if ((CoreExtension::inFilter("ROLE_ADMIN", CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 18, $this->source); })()), "user", [], "any", false, false, false, 18), "roles", [], "any", false, false, false, 18)) || CoreExtension::inFilter("ROLE_ADMIN_READ_ONLY", CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 18, $this->source); })()), "user", [], "any", false, false, false, 18), "roles", [], "any", false, false, false, 18)))) {
// line 19
yield " ";
$context["currentUserRoleModifier"] = "is-admin";
// line 20
yield " ";
yield from $this->load("_partials/nav/admin.html.twig", 20)->unwrap()->yield($context);
// line 21
yield " ";
} elseif (CoreExtension::inFilter("ROLE_COMPANY", CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 21, $this->source); })()), "user", [], "any", false, false, false, 21), "roles", [], "any", false, false, false, 21))) {
// line 22
yield " ";
$context["currentUserRoleModifier"] = "is-company";
// line 23
yield " ";
yield from $this->load("_partials/nav/company.html.twig", 23)->unwrap()->yield($context);
// line 24
yield " ";
} else {
// line 25
yield " ";
yield from $this->load("_partials/nav/user.html.twig", 25)->unwrap()->yield($context);
// line 26
yield " ";
}
} else {
// line 28
yield " ";
yield from $this->load("_partials/nav/main.html.twig", 28)->unwrap()->yield($context);
}
// line 30
yield "
";
// line 31
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 31, $this->source); })()), "user", [], "any", false, false, false, 31)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 32
yield " <div class=\"current-logged-in-user-role ";
yield (string) $this->escaper->escape((isset($context["currentUserRoleModifier"]) || array_key_exists("currentUserRoleModifier", $context) ? $context["currentUserRoleModifier"] : (function () { throw new RuntimeError('Variable "currentUserRoleModifier" does not exist.', 32, $this->source); })()), "html", null, true);
yield "\">
Connecté en tant
";
// line 34
if (CoreExtension::inFilter("ROLE_ADMIN", CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 34, $this->source); })()), "user", [], "any", false, false, false, 34), "roles", [], "any", false, false, false, 34))) {
// line 35
yield " qu\x27administrateur
";
} elseif (CoreExtension::inFilter("ROLE_ADMIN_READ_ONLY", CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 36
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 36, $this->source); })()), "user", [], "any", false, false, false, 36), "roles", [], "any", false, false, false, 36))) {
// line 37
yield " qu\x27agent de la DEAL
";
} elseif (CoreExtension::inFilter("ROLE_COMPANY", CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 38
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 38, $this->source); })()), "user", [], "any", false, false, false, 38), "roles", [], "any", false, false, false, 38))) {
// line 39
yield " qu\x27élagueur
";
} else {
// line 41
yield " qu\x27utilisateur
";
}
// line 43
yield " </div>
";
}
// line 45
yield "
";
// line 46
yield from $this->load("_partials/message.html.twig", 46)->unwrap()->yield($context);
// line 47
yield "
";
// line 48
yield from $this->load("_partials/message-popup.html.twig", 48)->unwrap()->yield($context);
// line 49
yield "
";
// line 50
yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
// line 51
yield "
";
// line 52
yield from $this->load("_partials/footer.html.twig", 52)->unwrap()->yield($context);
// line 53
yield "
";
// line 54
yield (string) $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackScriptTags("scripts");
yield "
";
// line 56
yield from $this->unwrap()->yieldBlock('javascripts', $context, $blocks);
// line 57
yield "<script>
const googleApiKey = \x27";
// line 58
yield (string) $this->escaper->escape((isset($context["GOOGLE_API_KEY"]) || array_key_exists("GOOGLE_API_KEY", $context) ? $context["GOOGLE_API_KEY"] : (function () { throw new RuntimeError('Variable "GOOGLE_API_KEY" does not exist.', 58, $this->source); })()), "html", null, true);
yield "\x27
let onlyRead = false
";
// line 61
if (((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 61, $this->source); })()), "user", [], "any", false, false, false, 61)) && $tmp instanceof Markup ? (string) $tmp : $tmp) && CoreExtension::inFilter("ROLE_ADMIN_READ_ONLY", CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 61, $this->source); })()), "user", [], "any", false, false, false, 61), "roles", [], "any", false, false, false, 61)))) {
// line 62
yield " onlyRead = true
";
}
// line 64
yield "</script>
</body>
</html>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
return; yield;
}
// line 5
/**
* @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"));
yield "Bienvenue";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 11
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_stylesheets(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", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 50
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(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", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 56
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(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", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "base.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDefaultEscapeStrategy(): string|false
{
return "html";
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 282 => 56, 260 => 50, 238 => 11, 215 => 5, 201 => 64, 197 => 62, 195 => 61, 189 => 58, 186 => 57, 184 => 56, 179 => 54, 176 => 53, 174 => 52, 171 => 51, 169 => 50, 166 => 49, 164 => 48, 161 => 47, 159 => 46, 156 => 45, 152 => 43, 148 => 41, 144 => 39, 142 => 38, 139 => 37, 137 => 36, 134 => 35, 132 => 34, 126 => 32, 124 => 31, 121 => 30, 117 => 28, 113 => 26, 110 => 25, 107 => 24, 104 => 23, 101 => 22, 98 => 21, 95 => 20, 92 => 19, 89 => 18, 87 => 17, 84 => 16, 82 => 15, 77 => 12, 75 => 11, 71 => 10, 63 => 5, 57 => 1,);
}
public function getSourceContext(): Source
{
return new Source("<!DOCTYPE html>
<html lang=\"fr\">
<head>
<meta charset=\"UTF-8\">
<title>{% block title %}Bienvenue{% endblock %}</title>
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">
<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>
<link href=\"https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400;1,600;1,700;1,800;1,900&display=swap\" rel=\"stylesheet\">
{{ encore_entry_link_tags(\x27stylesheets\x27) }}
{% block stylesheets %}{% endblock %}
</head>
<body>
{% set currentUserRoleModifier = null %}
{% if app.user %}
{% if \x27ROLE_ADMIN\x27 in app.user.roles or \x27ROLE_ADMIN_READ_ONLY\x27 in app.user.roles %}
{% set currentUserRoleModifier = \x27is-admin\x27 %}
{% include(\x27_partials/nav/admin.html.twig\x27) %}
{% elseif \x27ROLE_COMPANY\x27 in app.user.roles %}
{% set currentUserRoleModifier = \x27is-company\x27 %}
{% include(\x27_partials/nav/company.html.twig\x27) %}
{% else %}
{% include(\x27_partials/nav/user.html.twig\x27) %}
{% endif %}
{% else %}
{% include(\x27_partials/nav/main.html.twig\x27) %}
{% endif %}
{% if app.user %}
<div class=\"current-logged-in-user-role {{ currentUserRoleModifier }}\">
Connecté en tant
{% if \x27ROLE_ADMIN\x27 in app.user.roles %}
qu\x27administrateur
{% elseif \x27ROLE_ADMIN_READ_ONLY\x27 in app.user.roles %}
qu\x27agent de la DEAL
{% elseif \x27ROLE_COMPANY\x27 in app.user.roles %}
qu\x27élagueur
{% else %}
qu\x27utilisateur
{% endif %}
</div>
{% endif %}
{% include \x27_partials/message.html.twig\x27 %}
{% include \x27_partials/message-popup.html.twig\x27 %}
{% block body %}{% endblock %}
{% include(\x27_partials/footer.html.twig\x27) %}
{{ encore_entry_script_tags(\x27scripts\x27) }}
{% block javascripts %}{% endblock %}
<script>
const googleApiKey = \x27{{ GOOGLE_API_KEY }}\x27
let onlyRead = false
{% if app.user and \x27ROLE_ADMIN_READ_ONLY\x27 in app.user.roles %}
onlyRead = true
{% endif %}
</script>
</body>
</html>
", "base.html.twig", "/home/www-dev/dev/zinvaziv.re/app/templates/base.html.twig");
}
}