var/cache/dev/twig/a3/a3eb174cc3998f952bd906eb93fab402.php line 108

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. /* theme/default/component-blocks/generic-block.html.twig */
  15. class __TwigTemplate_21def5f655b0eac159842f272b58c8b1 extends Template
  16. {
  17. private $source;
  18. private $macros = [];
  19. public function __construct(Environment $env)
  20. {
  21. parent::__construct($env);
  22. $this->source = $this->getSourceContext();
  23. $this->parent = false;
  24. $this->blocks = [
  25. ];
  26. }
  27. protected function doDisplay(array $context, array $blocks = [])
  28. {
  29. $macros = $this->macros;
  30. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "theme/default/component-blocks/generic-block.html.twig"));
  32. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "theme/default/component-blocks/generic-block.html.twig"));
  34. // line 1
  35. 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); })())))) {
  36. // line 2
  37. yield " ";
  38. $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/");
  39. // line 3
  40. yield "
  41. ";
  42. // line 4
  43. $context["template_map"] = ["template" => ((CoreExtension::getAttribute($this->env, $this->source, // line 5
  44. ($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
  45. (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
  46. (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
  47. (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
  48. (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
  49. (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
  50. (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
  51. (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
  52. (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
  53. (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
  54. (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
  55. (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
  56. (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
  57. (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
  58. (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
  59. (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
  60. (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
  61. (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
  62. (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
  63. (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
  64. (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
  65. (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")]];
  66. // line 32
  67. yield "
  68. ";
  69. // line 34
  70. 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))) {
  71. // line 35
  72. yield " ";
  73. 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);
  74. yield "
  75. ";
  76. } elseif (((CoreExtension::getAttribute($this->env, $this->source, // line 36
  77. (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))) {
  78. // line 37
  79. yield " ";
  80. 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)) {
  81. // line 38
  82. yield " ";
  83. 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);
  84. yield "
  85. ";
  86. }
  87. // line 40
  88. yield " ";
  89. } 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)) {
  90. // line 41
  91. yield " ";
  92. 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")) {
  93. // line 42
  94. yield " ";
  95. 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)) {
  96. // line 43
  97. yield " ";
  98. 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);
  99. yield "
  100. ";
  101. } else {
  102. // line 45
  103. yield " ";
  104. 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);
  105. yield "
  106. ";
  107. }
  108. // line 47
  109. yield " ";
  110. } else {
  111. // line 48
  112. yield " ";
  113. 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);
  114. yield "
  115. ";
  116. }
  117. // line 50
  118. yield " ";
  119. }
  120. }
  121. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  122. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  123. return; yield '';
  124. }
  125. /**
  126. * @codeCoverageIgnore
  127. */
  128. public function getTemplateName()
  129. {
  130. return "theme/default/component-blocks/generic-block.html.twig";
  131. }
  132. /**
  133. * @codeCoverageIgnore
  134. */
  135. public function isTraitable()
  136. {
  137. return false;
  138. }
  139. /**
  140. * @codeCoverageIgnore
  141. */
  142. public function getDebugInfo()
  143. {
  144. 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,);
  145. }
  146. public function getSourceContext()
  147. {
  148. return new Source("{% if bloc is defined and bloc is not empty %}
  149. {% set theme_path = 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-blocks/' %}
  150. {% set template_map = {
  151. 'template': bloc.template is defined ? bloc.template | raw : null,
  152. 'dynamic-block': {
  153. 'principal-block': theme_path ~ 'principal-block.html.twig',
  154. 'benefits-block': theme_path ~ 'benefits-block.html.twig',
  155. 'picto-block': theme_path ~ 'picto-block.html.twig',
  156. },
  157. 'bloc-partenaire': theme_path ~ 'partner_block.html.twig',
  158. 'block-image': theme_path ~ 'image-block.html.twig',
  159. 'block-gallery': theme_path ~ 'gallery-block.html.twig',
  160. 'block-text': theme_path ~ 'title-text-block.html.twig',
  161. 'block-video': theme_path ~ 'video-block.html.twig',
  162. 'block-media-text': theme_path ~ 'media-text-block.html.twig',
  163. 'block-tarifs': theme_path ~ 'tarifs-block.html.twig',
  164. 'block-onglets': theme_path ~ 'onglets-block.html.twig',
  165. 'block-etaps': theme_path ~ 'etaps-block.html.twig',
  166. 'block-links': theme_path ~ 'links-block.html.twig',
  167. 'block-bandeau': theme_path ~ 'bandeau-block.html.twig',
  168. 'dynamic-form': {
  169. 'default': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/default_form_template.html.twig',
  170. 'wizard-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/default_form_wizard.html.twig',
  171. 'contact-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/contact_form_template.html.twig',
  172. 'question-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/question_form_template.html.twig',
  173. 'candidature-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/candidature_form_template.html.twig',
  174. 'encart-contact-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/encart_contact_form.html.twig',
  175. 'avis-form': 'theme/' ~ app.request.server.get('APP_THEME') ~ '/component-forms/avis_form.html.twig',
  176. }
  177. } %}
  178. {% if bloc.type == 'template' and template_map['template'] %}
  179. {{ template_map['template']|raw }}
  180. {% elseif bloc.type == 'dynamic-block' and bloc.data != null %}
  181. {% if template_map['dynamic-block'][bloc.data.alias] is defined %}
  182. {{ include(template_map['dynamic-block'][bloc.data.alias], { bloc: bloc.data }, with_context = false) }}
  183. {% endif %}
  184. {% elseif template_map[bloc.type] is defined %}
  185. {% if bloc.type == 'dynamic-form' %}
  186. {% if template_map['dynamic-form'][bloc.form.identifier] is defined %}
  187. {{ include(template_map['dynamic-form'][bloc.form.identifier], { bloc: bloc }, with_context = false) }}
  188. {% else %}
  189. {{ include(template_map['dynamic-form']['default'], { bloc: bloc }, with_context = false) }}
  190. {% endif %}
  191. {% else %}
  192. {{ include(template_map[bloc.type], { bloc: bloc }, with_context = false) }}
  193. {% endif %}
  194. {% endif %}
  195. {% endif %}
  196. ", "theme/default/component-blocks/generic-block.html.twig", "/var/www/vhosts/klean.studiojna.fr/httpdocs/templates/theme/default/component-blocks/generic-block.html.twig");
  197. }
  198. }