var/cache/dev/twig/b8/b8936d7866d77c14e78c63f618bdf1ab.php line 253

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/organisms/tabs/tabs.html.twig */
  16. class __TwigTemplate_08abbaae752871bf3942d54fb619d3d6 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. 'entry' => [$this, 'block_entry'],
  30. 'entryContent' => [$this, 'block_entryContent'],
  31. ];
  32. }
  33. protected function doDisplay(array $context, array $blocks = []): iterable
  34. {
  35. $macros = $this->macros;
  36. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "components/organisms/tabs/tabs.html.twig"));
  38. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "components/organisms/tabs/tabs.html.twig"));
  40. // line 1
  41. $context["string"] = 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.', 1, $this->source); })()), "request", [], "any", false, false, false, 1), "cookies", [], "any", false, false, false, 1), "get", ["last-seen"], "method", false, false, false, 1);
  42. // line 2
  43. yield "<div class=\"tabs ";
  44. if ((($tmp = ((array_key_exists("background", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["background"]) || array_key_exists("background", $context) ? $context["background"] : (function () { throw new RuntimeError('Variable "background" does not exist.', 2, $this->source); })()))) : (""))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  45. yield " tabs--";
  46. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["background"]) || array_key_exists("background", $context) ? $context["background"] : (function () { throw new RuntimeError('Variable "background" does not exist.', 2, $this->source); })()), "html", null, true);
  47. }
  48. yield "\">
  49. <div class=\"tabs__inner\">
  50. ";
  51. // line 4
  52. if (array_key_exists("headline", $context)) {
  53. // line 5
  54. yield " <div class=\"tabs__headline\">
  55. ";
  56. // line 6
  57. 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.', 6, $this->source); })()));
  58. yield "
  59. </div>
  60. ";
  61. }
  62. // line 9
  63. yield "
  64. ";
  65. // line 10
  66. if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 10, $this->source); })())) > 0)) {
  67. // line 11
  68. yield " <div class=\"tabs__entries\" role=\"radiogroup\" aria-label=\"Tabs\">
  69. ";
  70. // line 12
  71. $context['_parent'] = $context;
  72. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 12, $this->source); })()));
  73. $context['loop'] = [
  74. 'parent' => $context['_parent'],
  75. 'index0' => 0,
  76. 'index' => 1,
  77. 'first' => true,
  78. ];
  79. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  80. $length = count($context['_seq']);
  81. $context['loop']['revindex0'] = $length - 1;
  82. $context['loop']['revindex'] = $length;
  83. $context['loop']['length'] = $length;
  84. $context['loop']['last'] = 1 === $length;
  85. }
  86. foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
  87. // line 13
  88. yield " ";
  89. yield from $this->unwrap()->yieldBlock('entry', $context, $blocks);
  90. // line 20
  91. yield " ";
  92. ++$context['loop']['index0'];
  93. ++$context['loop']['index'];
  94. $context['loop']['first'] = false;
  95. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  96. --$context['loop']['revindex0'];
  97. --$context['loop']['revindex'];
  98. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  99. }
  100. }
  101. $_parent = $context['_parent'];
  102. unset($context['_seq'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
  103. $context = array_intersect_key($context, $_parent) + $_parent;
  104. // line 21
  105. yield " <div class=\"tabs__scroll\">
  106. ";
  107. // line 22
  108. $context['_parent'] = $context;
  109. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 22, $this->source); })()));
  110. foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
  111. // line 23
  112. yield "
  113. ";
  114. // line 24
  115. if (((CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "component", [], "any", false, false, false, 24) != "last-seen-product-slider") || ( !(null === (isset($context["string"]) || array_key_exists("string", $context) ? $context["string"] : (function () { throw new RuntimeError('Variable "string" does not exist.', 24, $this->source); })())) && !Twig\Extension\CoreExtension::testEmpty((isset($context["string"]) || array_key_exists("string", $context) ? $context["string"] : (function () { throw new RuntimeError('Variable "string" does not exist.', 24, $this->source); })()))))) {
  116. // line 25
  117. yield " ";
  118. $context["id"] = ((CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "_uid", [], "any", true, true, false, 25)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "_uid", [], "any", false, false, false, 25), ((CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "id", [], "any", true, true, false, 25)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "id", [], "any", false, false, false, 25))) : ("")))) : (((CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "id", [], "any", true, true, false, 25)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "id", [], "any", false, false, false, 25))) : (""))));
  119. // line 26
  120. yield " <label for=\"";
  121. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 26, $this->source); })()), "html", null, true);
  122. yield "\" class=\"tabs__entry-label tabs__headline\">
  123. ";
  124. // line 27
  125. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, true, false, 27), "text", [], "any", true, true, false, 27)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, false, false, 27), "text", [], "any", false, false, false, 27), ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, true, false, 27), 0, [], "array", false, true, false, 27), "text", [], "any", true, true, false, 27)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, false, false, 27), 0, [], "array", false, false, false, 27), "text", [], "any", false, false, false, 27))) : ("")))) : (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, true, false, 27), 0, [], "array", false, true, false, 27), "text", [], "any", true, true, false, 27)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, false, false, 27), 0, [], "array", false, false, false, 27), "text", [], "any", false, false, false, 27))) : ("")))), "html", null, true);
  126. yield "
  127. </label>
  128. ";
  129. }
  130. // line 30
  131. yield "
  132. ";
  133. }
  134. $_parent = $context['_parent'];
  135. unset($context['_seq'], $context['_key'], $context['entry'], $context['_parent']);
  136. $context = array_intersect_key($context, $_parent) + $_parent;
  137. // line 32
  138. yield " </div>
  139. ";
  140. // line 33
  141. $context['_parent'] = $context;
  142. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 33, $this->source); })()));
  143. $context['loop'] = [
  144. 'parent' => $context['_parent'],
  145. 'index0' => 0,
  146. 'index' => 1,
  147. 'first' => true,
  148. ];
  149. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  150. $length = count($context['_seq']);
  151. $context['loop']['revindex0'] = $length - 1;
  152. $context['loop']['revindex'] = $length;
  153. $context['loop']['length'] = $length;
  154. $context['loop']['last'] = 1 === $length;
  155. }
  156. foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
  157. // line 34
  158. yield " <div class=\"tabs__content tabs__content--position\" >
  159. ";
  160. // line 35
  161. yield from $this->unwrap()->yieldBlock('entryContent', $context, $blocks);
  162. // line 44
  163. yield " </div>
  164. ";
  165. ++$context['loop']['index0'];
  166. ++$context['loop']['index'];
  167. $context['loop']['first'] = false;
  168. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  169. --$context['loop']['revindex0'];
  170. --$context['loop']['revindex'];
  171. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  172. }
  173. }
  174. $_parent = $context['_parent'];
  175. unset($context['_seq'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
  176. $context = array_intersect_key($context, $_parent) + $_parent;
  177. // line 46
  178. yield " </div>
  179. ";
  180. }
  181. // line 48
  182. yield " </div>
  183. </div>
  184. ";
  185. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  186. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  187. yield from [];
  188. }
  189. // line 13
  190. /**
  191. * @return iterable<null|scalar|\Stringable>
  192. */
  193. public function block_entry(array $context, array $blocks = []): iterable
  194. {
  195. $macros = $this->macros;
  196. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  197. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entry"));
  198. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  199. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entry"));
  200. // line 14
  201. yield " ";
  202. if (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 14, $this->source); })()), "component", [], "any", false, false, false, 14) != "last-seen-product-slider") || ( !(null === (isset($context["string"]) || array_key_exists("string", $context) ? $context["string"] : (function () { throw new RuntimeError('Variable "string" does not exist.', 14, $this->source); })())) && !Twig\Extension\CoreExtension::testEmpty((isset($context["string"]) || array_key_exists("string", $context) ? $context["string"] : (function () { throw new RuntimeError('Variable "string" does not exist.', 14, $this->source); })()))))) {
  203. // line 15
  204. yield " ";
  205. $context["id"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["entry"] ?? null), "_uid", [], "any", true, true, false, 15)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 15, $this->source); })()), "_uid", [], "any", false, false, false, 15), ((CoreExtension::getAttribute($this->env, $this->source, ($context["entry"] ?? null), "id", [], "any", true, true, false, 15)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 15, $this->source); })()), "id", [], "any", false, false, false, 15))) : ("")))) : (((CoreExtension::getAttribute($this->env, $this->source, ($context["entry"] ?? null), "id", [], "any", true, true, false, 15)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 15, $this->source); })()), "id", [], "any", false, false, false, 15))) : (""))));
  206. // line 16
  207. yield " <input class=\"tabs__input\" type=\"radio\" id=\"";
  208. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 16, $this->source); })()), "html", null, true);
  209. yield "\" name=\"css-tabs-";
  210. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("_uid", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["_uid"]) || array_key_exists("_uid", $context) ? $context["_uid"] : (function () { throw new RuntimeError('Variable "_uid" does not exist.', 16, $this->source); })()))) : ("")), "html", null, true);
  211. yield "\" ";
  212. if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["loop"]) || array_key_exists("loop", $context) ? $context["loop"] : (function () { throw new RuntimeError('Variable "loop" does not exist.', 16, $this->source); })()), "index", [], "any", false, false, false, 16) == 1)) {
  213. yield "checked ";
  214. }
  215. yield ">
  216. ";
  217. } else {
  218. // line 18
  219. yield " ";
  220. }
  221. // line 19
  222. yield " ";
  223. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  224. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  225. yield from [];
  226. }
  227. // line 35
  228. /**
  229. * @return iterable<null|scalar|\Stringable>
  230. */
  231. public function block_entryContent(array $context, array $blocks = []): iterable
  232. {
  233. $macros = $this->macros;
  234. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  235. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entryContent"));
  236. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  237. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entryContent"));
  238. // line 36
  239. yield " ";
  240. if ((array_key_exists("html_content", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["html_content"]) || array_key_exists("html_content", $context) ? $context["html_content"] : (function () { throw new RuntimeError('Variable "html_content" does not exist.', 36, $this->source); })())))) {
  241. // line 37
  242. yield " ";
  243. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["html_content"]) || array_key_exists("html_content", $context) ? $context["html_content"] : (function () { throw new RuntimeError('Variable "html_content" does not exist.', 37, $this->source); })()), "html", null, true);
  244. yield "
  245. ";
  246. } else {
  247. // line 39
  248. yield " ";
  249. yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 39, $this->source); })()), ["headline" => []]);
  250. // line 41
  251. yield "
  252. ";
  253. }
  254. // line 43
  255. yield " ";
  256. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  257. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  258. yield from [];
  259. }
  260. /**
  261. * @codeCoverageIgnore
  262. */
  263. public function getTemplateName(): string
  264. {
  265. return "components/organisms/tabs/tabs.html.twig";
  266. }
  267. /**
  268. * @codeCoverageIgnore
  269. */
  270. public function isTraitable(): bool
  271. {
  272. return false;
  273. }
  274. /**
  275. * @codeCoverageIgnore
  276. */
  277. public function getDebugInfo(): array
  278. {
  279. return array ( 279 => 43, 275 => 41, 272 => 39, 266 => 37, 263 => 36, 250 => 35, 239 => 19, 236 => 18, 224 => 16, 221 => 15, 218 => 14, 205 => 13, 191 => 48, 187 => 46, 172 => 44, 170 => 35, 167 => 34, 150 => 33, 147 => 32, 140 => 30, 134 => 27, 129 => 26, 126 => 25, 124 => 24, 121 => 23, 117 => 22, 114 => 21, 100 => 20, 97 => 13, 80 => 12, 77 => 11, 75 => 10, 72 => 9, 66 => 6, 63 => 5, 61 => 4, 52 => 2, 50 => 1,);
  280. }
  281. public function getSourceContext(): Source
  282. {
  283. return new Source("{% set string = app.request.cookies.get('last-seen') %}
  284. <div class=\"tabs {% if background|default %} tabs--{{ background }}{% endif %}\">
  285. <div class=\"tabs__inner\">
  286. {% if headline is defined %}
  287. <div class=\"tabs__headline\">
  288. {{ render_storyblok(headline) }}
  289. </div>
  290. {% endif %}
  291. {% if entries|length > 0 %}
  292. <div class=\"tabs__entries\" role=\"radiogroup\" aria-label=\"Tabs\">
  293. {% for entry in entries %}
  294. {% block entry %}
  295. {% if entry.component != 'last-seen-product-slider' or string is not null and string is not empty%}
  296. {% set id = entry._uid|default(entry.id|default()) %}
  297. <input class=\"tabs__input\" type=\"radio\" id=\"{{ id }}\" name=\"css-tabs-{{ _uid|default }}\" {% if (loop.index == 1) %}checked {% endif %}>
  298. {% else %}
  299. {% endif %}
  300. {% endblock %}
  301. {% endfor %}
  302. <div class=\"tabs__scroll\">
  303. {% for entry in entries %}
  304. {% if entry.component != 'last-seen-product-slider' or string is not null and string is not empty%}
  305. {% set id = entry._uid|default(entry.id|default()) %}
  306. <label for=\"{{ id }}\" class=\"tabs__entry-label tabs__headline\">
  307. {{ entry.headline.text|default(entry.headline[0].text|default) }}
  308. </label>
  309. {% endif %}
  310. {% endfor %}
  311. </div>
  312. {% for entry in entries %}
  313. <div class=\"tabs__content tabs__content--position\" >
  314. {% block entryContent %}
  315. {% if html_content is defined and html_content is not empty %}
  316. {{ html_content }}
  317. {% else %}
  318. {{ render_storyblok(entry, {
  319. 'headline': [],
  320. }) }}
  321. {% endif %}
  322. {% endblock %}
  323. </div>
  324. {% endfor %}
  325. </div>
  326. {% endif %}
  327. </div>
  328. </div>
  329. ", "components/organisms/tabs/tabs.html.twig", "/var/www/html/templates/default/components/organisms/tabs/tabs.html.twig");
  330. }
  331. }