<?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_a6d122750e9578a328122bae79b3e120 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 "\t";
$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 "
\t";
// 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"), "block-avis" => ( // line 22
(isset($context["theme_path"]) || array_key_exists("theme_path", $context) ? $context["theme_path"] : (function () { throw new RuntimeError('Variable "theme_path" does not exist.', 22, $this->source); })()) . "avis-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 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_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 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/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 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/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 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/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 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/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 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/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 30
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 30, $this->source); })()), "request", [], "any", false, false, false, 30), "server", [], "any", false, false, false, 30), "get", ["APP_THEME"], "method", false, false, false, 30)) . "/component-forms/avis_form_template.html.twig")]];
// line 35
yield "
\t";
// line 37
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.', 37, $this->source); })()), "type", [], "any", false, false, false, 37) == "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.', 37, $this->source); })()), "template", [], "array", false, false, false, 37))) {
// line 38
yield "\t\t";
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.', 38, $this->source); })()), "template", [], "array", false, false, false, 38);
yield "
\t";
} elseif (((CoreExtension::getAttribute($this->env, $this->source, // line 39
(isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 39, $this->source); })()), "type", [], "any", false, false, false, 39) == "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.', 39, $this->source); })()), "data", [], "any", false, false, false, 39) != null))) {
// line 40
yield "\t\t";
if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["template_map"] ?? null), "dynamic-block", [], "array", false, true, false, 40), 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.', 40, $this->source); })()), "data", [], "any", false, false, false, 40), "alias", [], "any", false, false, false, 40), [], "array", true, true, false, 40)) {
// line 41
yield "\t\t\t";
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.', 41, $this->source); })()), "dynamic-block", [], "array", false, false, false, 41), 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.', 41, $this->source); })()), "data", [], "any", false, false, false, 41), "alias", [], "any", false, false, false, 41), [], "array", false, false, false, 41), ["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.', 41, $this->source); })()), "data", [], "any", false, false, false, 41)], false);
yield "
\t\t";
}
// line 43
yield "\t";
} 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.', 43, $this->source); })()), "type", [], "any", false, false, false, 43), [], "array", true, true, false, 43)) {
// line 44
yield "\t\t";
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.', 44, $this->source); })()), "type", [], "any", false, false, false, 44) == "dynamic-form")) {
// line 45
yield "\t\t\t";
if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["template_map"] ?? null), "dynamic-form", [], "array", false, true, false, 45), 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.', 45, $this->source); })()), "form", [], "any", false, false, false, 45), "identifier", [], "any", false, false, false, 45), [], "array", true, true, false, 45)) {
// line 46
yield "\t\t\t\t";
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.', 46, $this->source); })()), "dynamic-form", [], "array", false, false, false, 46), 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.', 46, $this->source); })()), "form", [], "any", false, false, false, 46), "identifier", [], "any", false, false, false, 46), [], "array", false, false, false, 46), ["bloc" => (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 46, $this->source); })())], false);
yield "
\t\t\t";
} else {
// line 48
yield "\t\t\t\t";
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.', 48, $this->source); })()), "dynamic-form", [], "array", false, false, false, 48), "default", [], "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 "
\t\t\t";
}
// line 50
yield "\t\t";
} else {
// line 51
yield "\t\t\t";
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.', 51, $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.', 51, $this->source); })()), "type", [], "any", false, false, false, 51), [], "array", false, false, false, 51), ["bloc" => (isset($context["bloc"]) || array_key_exists("bloc", $context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.', 51, $this->source); })())], false);
yield "
\t\t";
}
// line 53
yield "\t";
}
}
$__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 ( 129 => 53, 123 => 51, 120 => 50, 114 => 48, 108 => 46, 105 => 45, 102 => 44, 99 => 43, 93 => 41, 90 => 40, 88 => 39, 83 => 38, 81 => 37, 77 => 35, 75 => 30, 74 => 29, 73 => 28, 72 => 27, 71 => 26, 70 => 25, 69 => 24, 68 => 22, 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 %}
\t{% set theme_path = 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-blocks/' %}
\t{% 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',
'block-avis': theme_path ~ 'avis-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_template.html.twig'
}
} %}
\t{% if bloc.type == 'template' and template_map['template'] %}
\t\t{{ template_map['template']|raw }}
\t{% elseif bloc.type == 'dynamic-block' and bloc.data != null %}
\t\t{% if template_map['dynamic-block'][bloc.data.alias] is defined %}
\t\t\t{{ include(template_map['dynamic-block'][bloc.data.alias], { bloc: bloc.data }, with_context = false) }}
\t\t{% endif %}
\t{% elseif template_map[bloc.type] is defined %}
\t\t{% if bloc.type == 'dynamic-form' %}
\t\t\t{% if template_map['dynamic-form'][bloc.form.identifier] is defined %}
\t\t\t\t{{ include(template_map['dynamic-form'][bloc.form.identifier], { bloc: bloc }, with_context = false) }}
\t\t\t{% else %}
\t\t\t\t{{ include(template_map['dynamic-form']['default'], { bloc: bloc }, with_context = false) }}
\t\t\t{% endif %}
\t\t{% else %}
\t\t\t{{ include(template_map[bloc.type], { bloc: bloc }, with_context = false) }}
\t\t{% endif %}
\t{% endif %}
{% endif %}
", "theme/default/component-blocks/generic-block.html.twig", "/home/sc5kala4210/agence.lebureaudessites.fr/templates/theme/default/component-blocks/generic-block.html.twig");
}
}