var/cache/website/dev/twig/70/707537e534b3a962493870c47f709ee9.php line 74

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\Sandbox\SecurityNotAllowedTestError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. use Twig\TemplateWrapper;
  16. /* pages/_includes/base/sub_menu/_submenu.html.twig */
  17. class __TwigTemplate_de93a18ba29ae9468199f95848c67d4c extends Template
  18. {
  19. private Source $source;
  20. /**
  21. * @var array<string, Template>
  22. */
  23. private array $macros = [];
  24. public function __construct(Environment $env)
  25. {
  26. parent::__construct($env);
  27. $this->source = $this->getSourceContext();
  28. $this->parent = false;
  29. $this->blocks = [
  30. ];
  31. }
  32. protected function doDisplay(array $context, array $blocks = []): iterable
  33. {
  34. $macros = $this->macros;
  35. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/_includes/base/sub_menu/_submenu.html.twig"));
  37. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/_includes/base/sub_menu/_submenu.html.twig"));
  39. // line 2
  40. $context["is_menu_mobile"] = (array_key_exists("mode", $context) && ((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 2, $this->source); })()) == "mobile"));
  41. // line 3
  42. $context["submenu_templates"] = ["company" => "pages/_includes/base/sub_menu/_submenu_company.html.twig", "destination" => "pages/_includes/base/sub_menu/_submenu_destination.html.twig", "riverside" => "pages/_includes/base/sub_menu/_submenu_riverside.html.twig", "specialOffer" => "pages/_includes/base/sub_menu/_submenu_special_offers.html.twig", "groupsCe" => "pages/_includes/base/sub_menu/_submenu_groups_ce.html.twig"];
  43. // line 10
  44. yield "
  45. <div class=\"site-header__mega br3 ";
  46. // line 11
  47. yield (string) (((($tmp = (isset($context["is_menu_mobile"]) || array_key_exists("is_menu_mobile", $context) ? $context["is_menu_mobile"] : (function () { throw new RuntimeError('Variable "is_menu_mobile" does not exist.', 11, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("accordion-content") : (""));
  48. yield "\">
  49. \t";
  50. // line 12
  51. if ( !(($tmp = (isset($context["is_menu_mobile"]) || array_key_exists("is_menu_mobile", $context) ? $context["is_menu_mobile"] : (function () { throw new RuntimeError('Variable "is_menu_mobile" does not exist.', 12, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  52. // line 13
  53. yield "\t\t<div class=\"site-header__mega-inner\">
  54. \t";
  55. }
  56. // line 15
  57. yield "
  58. \t";
  59. // line 16
  60. if (CoreExtension::getAttribute($this->env, $this->source, ($context["submenu_templates"] ?? null), ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "typeItem", [], "any", true, true, false, 16)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 16, $this->source); })()), "typeItem", [], "any", false, false, false, 16), "")) : ("")), [], "array", true, true, false, 16)) {
  61. // line 17
  62. yield "\t\t";
  63. yield from $this->load(CoreExtension::getAttribute($this->env, $this->source, (isset($context["submenu_templates"]) || array_key_exists("submenu_templates", $context) ? $context["submenu_templates"] : (function () { throw new RuntimeError('Variable "submenu_templates" does not exist.', 17, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 17, $this->source); })()), "typeItem", [], "any", false, false, false, 17), [], "array", false, false, false, 17), 17)->unwrap()->yield(CoreExtension::toArray(["item" => // line 18
  64. (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 18, $this->source); })()), "mode" => (( // line 19
  65. array_key_exists("mode", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["mode"]) || array_key_exists("mode", $context) ? $context["mode"] : (function () { throw new RuntimeError('Variable "mode" does not exist.', 19, $this->source); })()), "desktop")) : ("desktop"))]));
  66. // line 21
  67. yield "\t";
  68. }
  69. // line 22
  70. yield "
  71. \t";
  72. // line 28
  73. yield "
  74. \t";
  75. // line 29
  76. if ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "isMedia", [], "any", true, true, false, 29) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 29, $this->source); })()), "isMedia", [], "any", false, false, false, 29) == true))) {
  77. // line 30
  78. yield "\t\t";
  79. $context["highlightedImage"] = (((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "isExternalImage", [], "any", true, true, false, 30) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 30, $this->source); })()), "isExternalImage", [], "any", false, false, false, 30) == true))) ? (CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 30, $this->source); })()), "externalImage", [], "any", false, false, false, 30)) : (((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "internalImage", [], "any", true, true, false, 30)) ? ($this->extensions['App\Twig\MediaExtension']->getMediaUrlWithFallback(CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 30, $this->source); })()), "internalImage", [], "any", false, false, false, 30), "800x")) : ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/placeholders/menu.jpg")))));
  80. // line 31
  81. yield "\t\t<div class=\"highlighted-image\">
  82. \t\t\t";
  83. // line 32
  84. if ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "isLink", [], "any", true, true, false, 32) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 32, $this->source); })()), "isLink", [], "any", false, false, false, 32) == true))) {
  85. // line 33
  86. yield "\t\t\t\t";
  87. if ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "isExternalLink", [], "any", true, true, false, 33) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 33, $this->source); })()), "isExternalLink", [], "any", false, false, false, 33) == true))) {
  88. // line 34
  89. yield "\t\t\t\t\t<a href=\"";
  90. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "externalLink", [], "any", true, true, false, 34)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 34, $this->source); })()), "externalLink", [], "any", false, false, false, 34), "")) : ("")), "html", null, true);
  91. yield "\" target=\"_blank\" rel=\"nofollow\">
  92. \t\t\t\t\t\t<img class=\"br2\" src=\"";
  93. // line 35
  94. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["highlightedImage"]) || array_key_exists("highlightedImage", $context) ? $context["highlightedImage"] : (function () { throw new RuntimeError('Variable "highlightedImage" does not exist.', 35, $this->source); })()), "html", null, true);
  95. yield "\" alt=\"\">
  96. \t\t\t\t\t</a>
  97. \t\t\t\t";
  98. } else {
  99. // line 38
  100. yield "\t\t\t\t\t<sulu-link href=\"";
  101. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "internalLink", [], "any", true, true, false, 38)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 38, $this->source); })()), "internalLink", [], "any", false, false, false, 38), "")) : ("")), "html", null, true);
  102. yield "\">
  103. \t\t\t\t\t\t<img class=\"br2\" src=\"";
  104. // line 39
  105. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["highlightedImage"]) || array_key_exists("highlightedImage", $context) ? $context["highlightedImage"] : (function () { throw new RuntimeError('Variable "highlightedImage" does not exist.', 39, $this->source); })()), "html", null, true);
  106. yield "\" alt=\"\">
  107. \t\t\t\t\t</sulu-link>
  108. \t\t\t\t";
  109. }
  110. // line 42
  111. yield "\t\t\t";
  112. } else {
  113. // line 43
  114. yield "\t\t\t\t<img class=\"br2\" src=\"";
  115. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["highlightedImage"]) || array_key_exists("highlightedImage", $context) ? $context["highlightedImage"] : (function () { throw new RuntimeError('Variable "highlightedImage" does not exist.', 43, $this->source); })()), "html", null, true);
  116. yield "\" alt=\"\">
  117. \t\t\t";
  118. }
  119. // line 45
  120. yield "\t\t</div>
  121. \t";
  122. }
  123. // line 47
  124. yield "
  125. \t";
  126. // line 48
  127. if ( !(($tmp = (isset($context["is_menu_mobile"]) || array_key_exists("is_menu_mobile", $context) ? $context["is_menu_mobile"] : (function () { throw new RuntimeError('Variable "is_menu_mobile" does not exist.', 48, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  128. // line 49
  129. yield "\t\t</div>
  130. \t";
  131. }
  132. // line 51
  133. yield "</div>
  134. ";
  135. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  136. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  137. yield from [];
  138. }
  139. /**
  140. * @codeCoverageIgnore
  141. */
  142. public function getTemplateName(): string
  143. {
  144. return "pages/_includes/base/sub_menu/_submenu.html.twig";
  145. }
  146. /**
  147. * @codeCoverageIgnore
  148. */
  149. public function isTraitable(): bool
  150. {
  151. return false;
  152. }
  153. /**
  154. * @codeCoverageIgnore
  155. */
  156. public function getDebugInfo(): array
  157. {
  158. return array ( 142 => 51, 138 => 49, 136 => 48, 133 => 47, 129 => 45, 123 => 43, 120 => 42, 114 => 39, 109 => 38, 103 => 35, 98 => 34, 95 => 33, 93 => 32, 90 => 31, 87 => 30, 85 => 29, 82 => 28, 79 => 22, 76 => 21, 74 => 19, 73 => 18, 71 => 17, 69 => 16, 66 => 15, 62 => 13, 60 => 12, 56 => 11, 53 => 10, 51 => 3, 49 => 2,);
  159. }
  160. public function getSourceContext(): Source
  161. {
  162. return new Source("{# navigationItem : bloc Sulu (typeItem, singleLabel, multipleLabel) #}
  163. {% set is_menu_mobile = mode is defined and mode == \x27mobile\x27 %}
  164. {% set submenu_templates = {
  165. \t\x27company\x27: \x27pages/_includes/base/sub_menu/_submenu_company.html.twig\x27,
  166. \t\x27destination\x27: \x27pages/_includes/base/sub_menu/_submenu_destination.html.twig\x27,
  167. \t\x27riverside\x27: \x27pages/_includes/base/sub_menu/_submenu_riverside.html.twig\x27,
  168. \t\x27specialOffer\x27: \x27pages/_includes/base/sub_menu/_submenu_special_offers.html.twig\x27,
  169. \t\x27groupsCe\x27: \x27pages/_includes/base/sub_menu/_submenu_groups_ce.html.twig\x27,
  170. } %}
  171. <div class=\"site-header__mega br3 {{ is_menu_mobile ? \x27accordion-content\x27 : \x27\x27 }}\">
  172. \t{% if not is_menu_mobile %}
  173. \t\t<div class=\"site-header__mega-inner\">
  174. \t{% endif %}
  175. \t{% if submenu_templates[item.typeItem|default(\x27\x27)] is defined %}
  176. \t\t{% include submenu_templates[item.typeItem] with {
  177. \t\t\titem: item,
  178. \t\t\tmode: mode|default(\x27desktop\x27),
  179. \t\t} only %}
  180. \t{% endif %}
  181. \t{#
  182. \t\tGérer l\x27image mise en avant dans chaque sous-menu
  183. \t\tOn regarde si un média est lié, si oui s\x27il est externe ou interne, et on affiche l\x27image correspondante.
  184. \t\tSi un lien est lié à l\x27image, on regarde s\x27il est externe ou interne, et on ajoute des balises <a> ou <sulu-link> selon le cas. Sinon, on renvoie juste l\x27image.
  185. \t#}
  186. \t{% if item.isMedia is defined and item.isMedia == true %}
  187. \t\t{% set highlightedImage = item.isExternalImage is defined and item.isExternalImage == true ? item.externalImage : item.internalImage is defined ? sulu_media_url(item.internalImage, \x27800x\x27) : asset(\x27img/placeholders/menu.jpg\x27) %}
  188. \t\t<div class=\"highlighted-image\">
  189. \t\t\t{% if item.isLink is defined and item.isLink == true %}
  190. \t\t\t\t{% if item.isExternalLink is defined and item.isExternalLink == true %}
  191. \t\t\t\t\t<a href=\"{{ item.externalLink|default(\x27\x27) }}\" target=\"_blank\" rel=\"nofollow\">
  192. \t\t\t\t\t\t<img class=\"br2\" src=\"{{ highlightedImage }}\" alt=\"\">
  193. \t\t\t\t\t</a>
  194. \t\t\t\t{% else %}
  195. \t\t\t\t\t<sulu-link href=\"{{ item.internalLink|default(\x27\x27) }}\">
  196. \t\t\t\t\t\t<img class=\"br2\" src=\"{{ highlightedImage }}\" alt=\"\">
  197. \t\t\t\t\t</sulu-link>
  198. \t\t\t\t{% endif %}
  199. \t\t\t{% else %}
  200. \t\t\t\t<img class=\"br2\" src=\"{{ highlightedImage }}\" alt=\"\">
  201. \t\t\t{% endif %}
  202. \t\t</div>
  203. \t{% endif %}
  204. \t{% if not is_menu_mobile %}
  205. \t\t</div>
  206. \t{% endif %}
  207. </div>
  208. ", "pages/_includes/base/sub_menu/_submenu.html.twig", "/home/croisiland-pp/www/f0312421abff37637dabe6f4d57b6afd95d16263/templates/pages/_includes/base/sub_menu/_submenu.html.twig");
  209. }
  210. }