<?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;
/* theme/default/component-blocks/generic-block.html.twig */
class __TwigTemplate_21def5f655b0eac159842f272b58c8b1 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$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", "theme/default/component-blocks/generic-block.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "theme/default/component-blocks/generic-block.html.twig"));
// line 1
if ((array_key_exists("bloc", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 1, $this->source); })())))) {
// line 2
yield " ";
$context["theme_path"] = (("theme/" . CoreExtension::getAttribute($this->env, $this->source, 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.', 2, $this->source); })()), "request", [], "any", false, false, false, 2), "server", [], "any", false, false, false, 2), "get", ["APP_THEME"], "method", false, false, false, 2)) . "/component-blocks/");
// line 3
yield "
";
// line 4
$context["template_map"] = ["template" => ((CoreExtension::getAttribute($this->env, $this->source, // line 5
($context["bloc"] ?? null), "template", [], "any", true, true, false, 5)) ? (CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 5, $this->source); })()), "template", [], "any", false, false, false, 5)) : (null)), "dynamic-block" => ["principal-block" => ( // line 7
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 7, $this->source); })()) . "principal-block.html.twig"), "benefits-block" => ( // line 8
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 8, $this->source); })()) . "benefits-block.html.twig"), "picto-block" => ( // line 9
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 9, $this->source); })()) . "picto-block.html.twig")], "bloc-partenaire" => ( // line 11
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 11, $this->source); })()) . "partner_block.html.twig"), "block-image" => ( // line 12
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 12, $this->source); })()) . "image-block.html.twig"), "block-gallery" => ( // line 13
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 13, $this->source); })()) . "gallery-block.html.twig"), "block-text" => ( // line 14
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 14, $this->source); })()) . "title-text-block.html.twig"), "block-video" => ( // line 15
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 15, $this->source); })()) . "video-block.html.twig"), "block-media-text" => ( // line 16
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 16, $this->source); })()) . "media-text-block.html.twig"), "block-tarifs" => ( // line 17
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 17, $this->source); })()) . "tarifs-block.html.twig"), "block-onglets" => ( // line 18
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 18, $this->source); })()) . "onglets-block.html.twig"), "block-etaps" => ( // line 19
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 19, $this->source); })()) . "etaps-block.html.twig"), "block-links" => ( // line 20
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 20, $this->source); })()) . "links-block.html.twig"), "block-bandeau" => ( // line 21
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 21, $this->source); })()) . "bandeau-block.html.twig"), "dynamic-form" => ["default" => (("theme/" . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 23
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 23, $this->source); })()), "request", [], "any", false, false, false, 23), "server", [], "any", false, false, false, 23), "get", ["APP_THEME"], "method", false, false, false, 23)) . "/component-forms/default_form_template.html.twig"), "wizard-form" => (("theme/" . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 24
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 24, $this->source); })()), "request", [], "any", false, false, false, 24), "server", [], "any", false, false, false, 24), "get", ["APP_THEME"], "method", false, false, false, 24)) . "/component-forms/default_form_wizard.html.twig"), "contact-form" => (("theme/" . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 25
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 25, $this->source); })()), "request", [], "any", false, false, false, 25), "server", [], "any", false, false, false, 25), "get", ["APP_THEME"], "method", false, false, false, 25)) . "/component-forms/contact_form_template.html.twig"), "question-form" => (("theme/" . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 26
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 26, $this->source); })()), "request", [], "any", false, false, false, 26), "server", [], "any", false, false, false, 26), "get", ["APP_THEME"], "method", false, false, false, 26)) . "/component-forms/question_form_template.html.twig"), "candidature-form" => (("theme/" . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 27
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 27, $this->source); })()), "request", [], "any", false, false, false, 27), "server", [], "any", false, false, false, 27), "get", ["APP_THEME"], "method", false, false, false, 27)) . "/component-forms/candidature_form_template.html.twig"), "encart-contact-form" => (("theme/" . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 28
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 28, $this->source); })()), "request", [], "any", false, false, false, 28), "server", [], "any", false, false, false, 28), "get", ["APP_THEME"], "method", false, false, false, 28)) . "/component-forms/encart_contact_form.html.twig"), "avis-form" => (("theme/" . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 29
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 29, $this->source); })()), "request", [], "any", false, false, false, 29), "server", [], "any", false, false, false, 29), "get", ["APP_THEME"], "method", false, false, false, 29)) . "/component-forms/avis_form.html.twig")]];
// line 32
yield "
";
// line 34
if (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 34, $this->source); })()), "type", [], "any", false, false, false, 34) == "template") && CoreExtension::getAttribute($this->env, $this->source, (isset($context["template_map"]) || array_key_exists("template_map", $context) ? $context["template_map"] : (function () { throw new RuntimeError('Variable "template_map" does not exist.', 34, $this->source); })()), "template", [], "array", false, false, false, 34))) {
// line 35
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["template_map"]) || array_key_exists("template_map", $context) ? $context["template_map"] : (function () { throw new RuntimeError('Variable "template_map" does not exist.', 35, $this->source); })()), "template", [], "array", false, false, false, 35);
yield "
";
} elseif (((CoreExtension::getAttribute($this->env, $this->source, // line 36
(isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 36, $this->source); })()), "type", [], "any", false, false, false, 36) == "dynamic-block") && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 36, $this->source); })()), "data", [], "any", false, false, false, 36) != null))) {
// line 37
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["template_map"] ?? null), "dynamic-block", [], "array", false, true, false, 37), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 37, $this->source); })()), "data", [], "any", false, false, false, 37), "alias", [], "any", false, false, false, 37), [], "array", true, true, false, 37)) {
// line 38
yield " ";
yield Twig\Extension\CoreExtension::include($this->env, $context, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["template_map"]) || array_key_exists("template_map", $context) ? $context["template_map"] : (function () { throw new RuntimeError('Variable "template_map" does not exist.', 38, $this->source); })()), "dynamic-block", [], "array", false, false, false, 38), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 38, $this->source); })()), "data", [], "any", false, false, false, 38), "alias", [], "any", false, false, false, 38), [], "array", false, false, false, 38), ["bloc" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 38, $this->source); })()), "data", [], "any", false, false, false, 38)], false);
yield "
";
}
// line 40
yield " ";
} elseif (CoreExtension::getAttribute($this->env, $this->source, ($context["template_map"] ?? null), CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 40, $this->source); })()), "type", [], "any", false, false, false, 40), [], "array", true, true, false, 40)) {
// line 41
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 41, $this->source); })()), "type", [], "any", false, false, false, 41) == "dynamic-form")) {
// line 42
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["template_map"] ?? null), "dynamic-form", [], "array", false, true, false, 42), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 42, $this->source); })()), "form", [], "any", false, false, false, 42), "identifier", [], "any", false, false, false, 42), [], "array", true, true, false, 42)) {
// line 43
yield " ";
yield Twig\Extension\CoreExtension::include($this->env, $context, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["template_map"]) || array_key_exists("template_map", $context) ? $context["template_map"] : (function () { throw new RuntimeError('Variable "template_map" does not exist.', 43, $this->source); })()), "dynamic-form", [], "array", false, false, false, 43), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 43, $this->source); })()), "form", [], "any", false, false, false, 43), "identifier", [], "any", false, false, false, 43), [], "array", false, false, false, 43), ["bloc" => (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 43, $this->source); })())], false);
yield "
";
} else {
// line 45
yield " ";
yield Twig\Extension\CoreExtension::include($this->env, $context, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["template_map"]) || array_key_exists("template_map", $context) ? $context["template_map"] : (function () { throw new RuntimeError('Variable "template_map" does not exist.', 45, $this->source); })()), "dynamic-form", [], "array", false, false, false, 45), "default", [], "array", false, false, false, 45), ["bloc" => (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 45, $this->source); })())], false);
yield "
";
}
// line 47
yield " ";
} else {
// line 48
yield " ";
yield Twig\Extension\CoreExtension::include($this->env, $context, CoreExtension::getAttribute($this->env, $this->source, (isset($context["template_map"]) || array_key_exists("template_map", $context) ? $context["template_map"] : (function () { throw new RuntimeError('Variable "template_map" does not exist.', 48, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 48, $this->source); })()), "type", [], "any", false, false, false, 48), [], "array", false, false, false, 48), ["bloc" => (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 48, $this->source); })())], false);
yield "
";
}
// line 50
yield " ";
}
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "theme/default/component-blocks/generic-block.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 128 => 50, 122 => 48, 119 => 47, 113 => 45, 107 => 43, 104 => 42, 101 => 41, 98 => 40, 92 => 38, 89 => 37, 87 => 36, 82 => 35, 80 => 34, 76 => 32, 74 => 29, 73 => 28, 72 => 27, 71 => 26, 70 => 25, 69 => 24, 68 => 23, 67 => 21, 66 => 20, 65 => 19, 64 => 18, 63 => 17, 62 => 16, 61 => 15, 60 => 14, 59 => 13, 58 => 12, 57 => 11, 56 => 9, 55 => 8, 54 => 7, 53 => 5, 52 => 4, 49 => 3, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% if bloc is defined and bloc is not empty %}
{% set theme_path = 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-blocks/' %}
{% set template_map = {
'template': bloc.template is defined ? bloc.template | raw : null,
'dynamic-block': {
'principal-block': theme_path ~ 'principal-block.html.twig',
'benefits-block': theme_path ~ 'benefits-block.html.twig',
'picto-block': theme_path ~ 'picto-block.html.twig',
},
'bloc-partenaire': theme_path ~ 'partner_block.html.twig',
'block-image': theme_path ~ 'image-block.html.twig',
'block-gallery': theme_path ~ 'gallery-block.html.twig',
'block-text': theme_path ~ 'title-text-block.html.twig',
'block-video': theme_path ~ 'video-block.html.twig',
'block-media-text': theme_path ~ 'media-text-block.html.twig',
'block-tarifs': theme_path ~ 'tarifs-block.html.twig',
'block-onglets': theme_path ~ 'onglets-block.html.twig',
'block-etaps': theme_path ~ 'etaps-block.html.twig',
'block-links': theme_path ~ 'links-block.html.twig',
'block-bandeau': theme_path ~ 'bandeau-block.html.twig',
'dynamic-form': {
'default': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/default_form_template.html.twig',
'wizard-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/default_form_wizard.html.twig',
'contact-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/contact_form_template.html.twig',
'question-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/question_form_template.html.twig',
'candidature-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/candidature_form_template.html.twig',
'encart-contact-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/encart_contact_form.html.twig',
'avis-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/avis_form.html.twig',
}
} %}
{% if bloc.type == 'template' and template_map['template'] %}
{{ template_map['template']|raw }}
{% elseif bloc.type == 'dynamic-block' and bloc.data != null %}
{% if template_map['dynamic-block'][bloc.data.alias] is defined %}
{{ include(template_map['dynamic-block'][bloc.data.alias], { bloc: bloc.data }, with_context = false) }}
{% endif %}
{% elseif template_map[bloc.type] is defined %}
{% if bloc.type == 'dynamic-form' %}
{% if template_map['dynamic-form'][bloc.form.identifier] is defined %}
{{ include(template_map['dynamic-form'][bloc.form.identifier], { bloc: bloc }, with_context = false) }}
{% else %}
{{ include(template_map['dynamic-form']['default'], { bloc: bloc }, with_context = false) }}
{% endif %}
{% else %}
{{ include(template_map[bloc.type], { bloc: bloc }, with_context = false) }}
{% endif %}
{% endif %}
{% endif %}
", "theme/default/component-blocks/generic-block.html.twig", "/var/www/vhosts/klean.studiojna.fr/httpdocs/templates/theme/default/component-blocks/generic-block.html.twig");
}
}