var/cache/dev/twig/c8/c86c2aafcc94436a244f88f3c394fe52.php line 93

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. use Twig\TemplateWrapper;
  15. /* components/molecules/banner/banner.html.twig */
  16. class __TwigTemplate_287c41d23d98a327402b716392168d81 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->parent = false;
  28. $this->blocks = [
  29. ];
  30. }
  31. protected function doDisplay(array $context, array $blocks = []): iterable
  32. {
  33. $macros = $this->macros;
  34. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "components/molecules/banner/banner.html.twig"));
  36. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "components/molecules/banner/banner.html.twig"));
  38. // line 1
  39. $macros["storyblok"] = $this->macros["storyblok"] = $this->load("macros/storyblok.html.twig", 1)->unwrap();
  40. // line 2
  41. yield "
  42. ";
  43. // line 3
  44. $context["bannerModifiers"] = "";
  45. // line 4
  46. if (array_key_exists("bannerStyle", $context)) {
  47. // line 5
  48. yield " ";
  49. $context["bannerModifiers"] = (((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 5, $this->source); })()) . " banner--") . (isset($context["bannerStyle"]) || array_key_exists("bannerStyle", $context) ? $context["bannerStyle"] : (function () { throw new RuntimeError('Variable "bannerStyle" does not exist.', 5, $this->source); })()));
  50. // line 6
  51. yield "
  52. ";
  53. // line 7
  54. if (((isset($context["bannerStyle"]) || array_key_exists("bannerStyle", $context) ? $context["bannerStyle"] : (function () { throw new RuntimeError('Variable "bannerStyle" does not exist.', 7, $this->source); })()) == "content-box")) {
  55. // line 8
  56. yield " ";
  57. $context["bannerHeadlineModifier"] = " headline--background";
  58. // line 9
  59. yield " ";
  60. }
  61. }
  62. // line 11
  63. if ((array_key_exists("invertColor", $context) && ((isset($context["invertColor"]) || array_key_exists("invertColor", $context) ? $context["invertColor"] : (function () { throw new RuntimeError('Variable "invertColor" does not exist.', 11, $this->source); })()) == true))) {
  64. // line 12
  65. yield " ";
  66. $context["bannerModifiers"] = ((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 12, $this->source); })()) . " banner--invert");
  67. }
  68. // line 14
  69. if ((array_key_exists("overlay", $context) && ((isset($context["overlay"]) || array_key_exists("overlay", $context) ? $context["overlay"] : (function () { throw new RuntimeError('Variable "overlay" does not exist.', 14, $this->source); })()) == true))) {
  70. // line 15
  71. yield " ";
  72. $context["bannerModifiers"] = ((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 15, $this->source); })()) . " banner--overlay");
  73. }
  74. // line 17
  75. if (array_key_exists("button", $context)) {
  76. // line 18
  77. yield " ";
  78. $context["button"] = Twig\Extension\CoreExtension::map($this->env, (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 18, $this->source); })()), function ($__buttonItem__) use ($context, $macros) { $context["buttonItem"] = $__buttonItem__; return Twig\Extension\CoreExtension::merge((isset($context["buttonItem"]) || array_key_exists("buttonItem", $context) ? $context["buttonItem"] : (function () { throw new RuntimeError('Variable "buttonItem" does not exist.', 18, $this->source); })()), ["text" => ((CoreExtension::getAttribute($this->env, $this->source, ($context["buttonItem"] ?? null), "label", [], "any", true, true, false, 18)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["buttonItem"]) || array_key_exists("buttonItem", $context) ? $context["buttonItem"] : (function () { throw new RuntimeError('Variable "buttonItem" does not exist.', 18, $this->source); })()), "label", [], "any", false, false, false, 18), ((CoreExtension::getAttribute($this->env, $this->source, ($context["buttonItem"] ?? null), "text", [], "any", true, true, false, 18)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["buttonItem"]) || array_key_exists("buttonItem", $context) ? $context["buttonItem"] : (function () { throw new RuntimeError('Variable "buttonItem" does not exist.', 18, $this->source); })()), "text", [], "any", false, false, false, 18), "")) : ("")))) : (((CoreExtension::getAttribute($this->env, $this->source, ($context["buttonItem"] ?? null), "text", [], "any", true, true, false, 18)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["buttonItem"]) || array_key_exists("buttonItem", $context) ? $context["buttonItem"] : (function () { throw new RuntimeError('Variable "buttonItem" does not exist.', 18, $this->source); })()), "text", [], "any", false, false, false, 18), "")) : (""))))]); });
  79. }
  80. // line 20
  81. yield "
  82. ";
  83. // line 21
  84. $context["inner"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
  85. // line 22
  86. yield " <div class=\"banner__background\">
  87. <div class=\"banner__image\">
  88. ";
  89. // line 25
  90. yield " ";
  91. yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 25, $this->source); })()), ["class" => "banner__img-element image__src--cover", "objectFit" => "cover"]);
  92. // line 28
  93. yield "
  94. </div>
  95. <div class=\"banner__image-overlay\"></div>
  96. </div>
  97. <div class=\"banner__inner\">
  98. <div class=\"banner__content\">
  99. ";
  100. // line 34
  101. if (array_key_exists("headline", $context)) {
  102. // line 35
  103. yield " <div class=\"banner__headline\">
  104. ";
  105. // line 37
  106. yield " ";
  107. yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["headline"]) || array_key_exists("headline", $context) ? $context["headline"] : (function () { throw new RuntimeError('Variable "headline" does not exist.', 37, $this->source); })()), ["class" => ("headline--no-spacing" . (( // line 38
  108. array_key_exists("bannerHeadlineModifier", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["bannerHeadlineModifier"]) || array_key_exists("bannerHeadlineModifier", $context) ? $context["bannerHeadlineModifier"] : (function () { throw new RuntimeError('Variable "bannerHeadlineModifier" does not exist.', 38, $this->source); })()))) : ("")))]);
  109. // line 39
  110. yield "
  111. </div>
  112. ";
  113. }
  114. // line 42
  115. yield "
  116. ";
  117. // line 43
  118. if (array_key_exists("subheadline", $context)) {
  119. // line 44
  120. yield " <div class=\"banner__subheadline\">
  121. ";
  122. // line 46
  123. yield " ";
  124. yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["subheadline"]) || array_key_exists("subheadline", $context) ? $context["subheadline"] : (function () { throw new RuntimeError('Variable "subheadline" does not exist.', 46, $this->source); })()), ["class" => "headline--no-spacing"]);
  125. // line 48
  126. yield "
  127. </div>
  128. ";
  129. }
  130. // line 51
  131. yield "
  132. ";
  133. // line 52
  134. if (array_key_exists("description", $context)) {
  135. // line 53
  136. yield " <div class=\"banner__description\">
  137. ";
  138. // line 55
  139. yield " ";
  140. yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["description"]) || array_key_exists("description", $context) ? $context["description"] : (function () { throw new RuntimeError('Variable "description" does not exist.', 55, $this->source); })()), ["class" => "banner__text"]);
  141. // line 57
  142. yield "
  143. </div>
  144. ";
  145. }
  146. // line 60
  147. yield "
  148. ";
  149. // line 61
  150. if (array_key_exists("button", $context)) {
  151. // line 62
  152. yield " ";
  153. if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 62, $this->source); })())) > 1)) {
  154. // line 63
  155. yield " ";
  156. $context['_parent'] = $context;
  157. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 63, $this->source); })()));
  158. foreach ($context['_seq'] as $context["_key"] => $context["buttonItem"]) {
  159. // line 64
  160. yield " <div class=\"banner__action\">
  161. ";
  162. // line 65
  163. yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, $context["buttonItem"]);
  164. yield "
  165. </div>
  166. ";
  167. }
  168. $_parent = $context['_parent'];
  169. unset($context['_seq'], $context['_key'], $context['buttonItem'], $context['_parent']);
  170. $context = array_intersect_key($context, $_parent) + $_parent;
  171. // line 68
  172. yield " ";
  173. } else {
  174. // line 69
  175. yield " ";
  176. $context["buttonclean"] = Twig\Extension\CoreExtension::first($this->env->getCharset(), (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 69, $this->source); })()));
  177. // line 70
  178. yield " <div class=\"banner__action\">
  179. ";
  180. // line 71
  181. yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["buttonclean"]) || array_key_exists("buttonclean", $context) ? $context["buttonclean"] : (function () { throw new RuntimeError('Variable "buttonclean" does not exist.', 71, $this->source); })()), ["href" => false]);
  182. // line 73
  183. yield "
  184. </div>
  185. ";
  186. }
  187. // line 76
  188. yield " ";
  189. }
  190. // line 77
  191. yield " </div>
  192. </div>
  193. ";
  194. yield from [];
  195. })())) ? '' : new Markup($tmp, $this->env->getCharset());
  196. // line 80
  197. yield "
  198. ";
  199. // line 81
  200. if ((array_key_exists("button", $context) && (Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 81, $this->source); })())) == 1))) {
  201. // line 82
  202. yield " <a class=\"banner";
  203. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 82, $this->source); })()), "html", null, true);
  204. yield " ";
  205. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("class", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 82, $this->source); })()))) : ("")), "html", null, true);
  206. yield "\" href=\"";
  207. yield Twig\Extension\CoreExtension::spaceless($macros["storyblok"]->getTemplateForMacro("macro_storyblokLink", $context, 82, $this->getSourceContext())->macro_storyblokLink(...[CoreExtension::getAttribute($this->env, $this->source, Twig\Extension\CoreExtension::first($this->env->getCharset(), (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 82, $this->source); })())), "href", [], "any", false, false, false, 82)]));
  208. yield "\">
  209. ";
  210. // line 83
  211. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["inner"]) || array_key_exists("inner", $context) ? $context["inner"] : (function () { throw new RuntimeError('Variable "inner" does not exist.', 83, $this->source); })()), "html", null, true);
  212. yield "
  213. </a>
  214. ";
  215. } else {
  216. // line 86
  217. yield " <div class=\"banner";
  218. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 86, $this->source); })()), "html", null, true);
  219. yield " ";
  220. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("class", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 86, $this->source); })()))) : ("")), "html", null, true);
  221. yield "\">
  222. ";
  223. // line 87
  224. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["inner"]) || array_key_exists("inner", $context) ? $context["inner"] : (function () { throw new RuntimeError('Variable "inner" does not exist.', 87, $this->source); })()), "html", null, true);
  225. yield "
  226. </div>
  227. ";
  228. }
  229. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  230. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  231. yield from [];
  232. }
  233. /**
  234. * @codeCoverageIgnore
  235. */
  236. public function getTemplateName(): string
  237. {
  238. return "components/molecules/banner/banner.html.twig";
  239. }
  240. /**
  241. * @codeCoverageIgnore
  242. */
  243. public function isTraitable(): bool
  244. {
  245. return false;
  246. }
  247. /**
  248. * @codeCoverageIgnore
  249. */
  250. public function getDebugInfo(): array
  251. {
  252. return array ( 233 => 87, 226 => 86, 220 => 83, 211 => 82, 209 => 81, 206 => 80, 200 => 77, 197 => 76, 192 => 73, 190 => 71, 187 => 70, 184 => 69, 181 => 68, 172 => 65, 169 => 64, 164 => 63, 161 => 62, 159 => 61, 156 => 60, 151 => 57, 148 => 55, 145 => 53, 143 => 52, 140 => 51, 135 => 48, 132 => 46, 129 => 44, 127 => 43, 124 => 42, 119 => 39, 117 => 38, 115 => 37, 112 => 35, 110 => 34, 102 => 28, 99 => 25, 95 => 22, 93 => 21, 90 => 20, 86 => 18, 84 => 17, 80 => 15, 78 => 14, 74 => 12, 72 => 11, 68 => 9, 65 => 8, 63 => 7, 60 => 6, 57 => 5, 55 => 4, 53 => 3, 50 => 2, 48 => 1,);
  253. }
  254. public function getSourceContext(): Source
  255. {
  256. return new Source("{% import 'macros/storyblok.html.twig' as storyblok %}
  257. {% set bannerModifiers = '' %}
  258. {% if bannerStyle is defined %}
  259. {% set bannerModifiers = bannerModifiers ~ ' banner--' ~ bannerStyle %}
  260. {% if bannerStyle == 'content-box' %}
  261. {% set bannerHeadlineModifier = ' headline--background' %}
  262. {% endif %}
  263. {% endif %}
  264. {% if invertColor is defined and invertColor == true%}
  265. {% set bannerModifiers = bannerModifiers ~ ' banner--invert' %}
  266. {% endif %}
  267. {% if overlay is defined and overlay == true%}
  268. {% set bannerModifiers = bannerModifiers ~ ' banner--overlay' %}
  269. {% endif %}
  270. {% if button is defined %}
  271. {% set button = button|map((buttonItem) => buttonItem|merge({ text: buttonItem.label|default(buttonItem.text|default('')) })) %}
  272. {% endif %}
  273. {% set inner %}
  274. <div class=\"banner__background\">
  275. <div class=\"banner__image\">
  276. {# atoms/image #}
  277. {{ render_storyblok(banner, {
  278. class: 'banner__img-element image__src--cover',
  279. objectFit: 'cover'
  280. }) }}
  281. </div>
  282. <div class=\"banner__image-overlay\"></div>
  283. </div>
  284. <div class=\"banner__inner\">
  285. <div class=\"banner__content\">
  286. {% if headline is defined %}
  287. <div class=\"banner__headline\">
  288. {# atoms/headline #}
  289. {{ render_storyblok(headline, {
  290. class: 'headline--no-spacing' ~ bannerHeadlineModifier|default,
  291. }) }}
  292. </div>
  293. {% endif %}
  294. {% if subheadline is defined %}
  295. <div class=\"banner__subheadline\">
  296. {# atoms/headline #}
  297. {{ render_storyblok(subheadline, {
  298. class: 'headline--no-spacing',
  299. }) }}
  300. </div>
  301. {% endif %}
  302. {% if description is defined %}
  303. <div class=\"banner__description\">
  304. {# atoms/paragraph or molecules/text-list #}
  305. {{ render_storyblok(description, {
  306. class: 'banner__text',
  307. }) }}
  308. </div>
  309. {% endif %}
  310. {% if button is defined %}
  311. {% if button|length > 1 %}
  312. {% for buttonItem in button %}
  313. <div class=\"banner__action\">
  314. {{ render_storyblok(buttonItem) }}
  315. </div>
  316. {% endfor %}
  317. {% else %}
  318. {% set buttonclean = button|first %}
  319. <div class=\"banner__action\">
  320. {{ render_storyblok(buttonclean, {
  321. href: false,
  322. }) }}
  323. </div>
  324. {% endif %}
  325. {% endif %}
  326. </div>
  327. </div>
  328. {% endset %}
  329. {% if button is defined and button|length == 1 %}
  330. <a class=\"banner{{ bannerModifiers }} {{ class|default }}\" href=\"{{ storyblok.storyblokLink((button|first).href)|spaceless }}\">
  331. {{ inner }}
  332. </a>
  333. {% else %}
  334. <div class=\"banner{{ bannerModifiers }} {{ class|default }}\">
  335. {{ inner }}
  336. </div>
  337. {% endif %}
  338. ", "components/molecules/banner/banner.html.twig", "/var/www/html/templates/default/components/molecules/banner/banner.html.twig");
  339. }
  340. }