var/cache/dev/twig/bc/bcfd69bc7bb9bb1922ebc9a7f4270fa3.php line 49

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/atoms/text-link/text-link.html.twig */
  16. class __TwigTemplate_d08b2d2e3cb251b8654f0bfa5d2e1d8e 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. 'linkText' => [$this, 'block_linkText'],
  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", "components/atoms/text-link/text-link.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", "components/atoms/text-link/text-link.html.twig"));
  39. // line 1
  40. $macros["storyblok"] = $this->macros["storyblok"] = $this->load("macros/storyblok.html.twig", 1)->unwrap();
  41. // line 2
  42. yield "
  43. ";
  44. // line 3
  45. if ((((array_key_exists("reserveBoldSpace", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["reserveBoldSpace"]) || array_key_exists("reserveBoldSpace", $context) ? $context["reserveBoldSpace"] : (function () { throw new RuntimeError('Variable "reserveBoldSpace" does not exist.', 3, $this->source); })()), false)) : (false)) && array_key_exists("text", $context))) {
  46. // line 4
  47. yield " ";
  48. $context["attributes"] = Twig\Extension\CoreExtension::merge(((array_key_exists("attributes", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 4, $this->source); })()), [])) : ([])), ["data-reserve-bold-space" => (isset($context["text"]) || array_key_exists("text", $context) ? $context["text"] : (function () { throw new RuntimeError('Variable "text" does not exist.', 4, $this->source); })())]);
  49. }
  50. // line 6
  51. yield "
  52. ";
  53. // line 7
  54. $context["inner"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
  55. // line 8
  56. yield " ";
  57. yield from $this->unwrap()->yieldBlock('linkText', $context, $blocks);
  58. // line 11
  59. yield "
  60. ";
  61. // line 13
  62. yield " ";
  63. if ((array_key_exists("class", $context) && CoreExtension::inFilter("arrow", (isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 13, $this->source); })())))) {
  64. // line 14
  65. yield " <span class=\"text-link__arrow\"></span>
  66. ";
  67. }
  68. yield from [];
  69. })())) ? '' : new Markup($tmp, $this->env->getCharset());
  70. // line 17
  71. yield "
  72. ";
  73. // line 18
  74. if ((($tmp = ((array_key_exists("href", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["href"]) || array_key_exists("href", $context) ? $context["href"] : (function () { throw new RuntimeError('Variable "href" does not exist.', 18, $this->source); })()), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  75. // line 19
  76. yield " <a
  77. href=\"";
  78. // line 20
  79. yield Twig\Extension\CoreExtension::spaceless($macros["storyblok"]->getTemplateForMacro("macro_storyblokLink", $context, 20, $this->getSourceContext())->macro_storyblokLink(...[(isset($context["href"]) || array_key_exists("href", $context) ? $context["href"] : (function () { throw new RuntimeError('Variable "href" does not exist.', 20, $this->source); })())]));
  80. yield "\"
  81. ";
  82. // line 21
  83. if ((array_key_exists("target", $context) && ((isset($context["target"]) || array_key_exists("target", $context) ? $context["target"] : (function () { throw new RuntimeError('Variable "target" does not exist.', 21, $this->source); })()) != ""))) {
  84. yield "target=\"";
  85. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["target"]) || array_key_exists("target", $context) ? $context["target"] : (function () { throw new RuntimeError('Variable "target" does not exist.', 21, $this->source); })()), "html", null, true);
  86. yield "\"";
  87. }
  88. // line 22
  89. yield " class=\"";
  90. 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.', 22, $this->source); })()), "text-link")) : ("text-link")), "html", null, true);
  91. yield " ";
  92. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("modifier", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["modifier"]) || array_key_exists("modifier", $context) ? $context["modifier"] : (function () { throw new RuntimeError('Variable "modifier" does not exist.', 22, $this->source); })()), "")) : ("")), "html", null, true);
  93. yield "\"
  94. ";
  95. // line 23
  96. yield $this->extensions['App\Twig\Filters\AttributesExtension']->componentAttributes(((array_key_exists("attributes", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 23, $this->source); })()), [])) : ([])));
  97. yield "
  98. ";
  99. // line 24
  100. yield (((($tmp = ((array_key_exists("gtm", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["gtm"]) || array_key_exists("gtm", $context) ? $context["gtm"] : (function () { throw new RuntimeError('Variable "gtm" does not exist.', 24, $this->source); })()), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["gtm"]) || array_key_exists("gtm", $context) ? $context["gtm"] : (function () { throw new RuntimeError('Variable "gtm" does not exist.', 24, $this->source); })()), "html", null, true)) : (""));
  101. yield "
  102. >
  103. ";
  104. // line 26
  105. 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.', 26, $this->source); })()), "html", null, true);
  106. yield "
  107. </a>
  108. ";
  109. } else {
  110. // line 29
  111. yield " <span class=\"";
  112. 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.', 29, $this->source); })()), "text-link")) : ("text-link")), "html", null, true);
  113. yield " ";
  114. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("modifier", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["modifier"]) || array_key_exists("modifier", $context) ? $context["modifier"] : (function () { throw new RuntimeError('Variable "modifier" does not exist.', 29, $this->source); })()), "")) : ("")), "html", null, true);
  115. yield "\" ";
  116. yield $this->extensions['App\Twig\Filters\AttributesExtension']->componentAttributes(((array_key_exists("attributes", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 29, $this->source); })()), [])) : ([])));
  117. yield " ";
  118. yield (((($tmp = ((array_key_exists("gtm", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["gtm"]) || array_key_exists("gtm", $context) ? $context["gtm"] : (function () { throw new RuntimeError('Variable "gtm" does not exist.', 29, $this->source); })()), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["gtm"]) || array_key_exists("gtm", $context) ? $context["gtm"] : (function () { throw new RuntimeError('Variable "gtm" does not exist.', 29, $this->source); })()), "html", null, true)) : (""));
  119. yield ">
  120. ";
  121. // line 30
  122. 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.', 30, $this->source); })()), "html", null, true);
  123. yield "
  124. </span>
  125. ";
  126. }
  127. // line 33
  128. yield "
  129. ";
  130. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  131. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  132. yield from [];
  133. }
  134. // line 8
  135. /**
  136. * @return iterable<null|scalar|\Stringable>
  137. */
  138. public function block_linkText(array $context, array $blocks = []): iterable
  139. {
  140. $macros = $this->macros;
  141. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  142. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "linkText"));
  143. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  144. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "linkText"));
  145. // line 9
  146. yield (isset($context["text"]) || array_key_exists("text", $context) ? $context["text"] : (function () { throw new RuntimeError('Variable "text" does not exist.', 9, $this->source); })());
  147. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  148. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  149. yield from [];
  150. }
  151. /**
  152. * @codeCoverageIgnore
  153. */
  154. public function getTemplateName(): string
  155. {
  156. return "components/atoms/text-link/text-link.html.twig";
  157. }
  158. /**
  159. * @codeCoverageIgnore
  160. */
  161. public function isTraitable(): bool
  162. {
  163. return false;
  164. }
  165. /**
  166. * @codeCoverageIgnore
  167. */
  168. public function getDebugInfo(): array
  169. {
  170. return array ( 162 => 9, 149 => 8, 137 => 33, 131 => 30, 120 => 29, 114 => 26, 109 => 24, 105 => 23, 98 => 22, 92 => 21, 88 => 20, 85 => 19, 83 => 18, 80 => 17, 74 => 14, 71 => 13, 68 => 11, 65 => 8, 63 => 7, 60 => 6, 56 => 4, 54 => 3, 51 => 2, 49 => 1,);
  171. }
  172. public function getSourceContext(): Source
  173. {
  174. return new Source("{% import 'macros/storyblok.html.twig' as storyblok %}
  175. {% if reserveBoldSpace|default(false) and text is defined %}
  176. {% set attributes = attributes|default([])|merge({'data-reserve-bold-space': text}) %}
  177. {% endif %}
  178. {% set inner %}
  179. {% block linkText %}
  180. {{- text|raw -}}
  181. {% endblock %}
  182. {# check if class is defined and if a arrow modifier was set (inline-arrow or arrow-right) #}
  183. {% if class is defined and 'arrow' in class %}
  184. <span class=\"text-link__arrow\"></span>
  185. {% endif %}
  186. {% endset %}
  187. {% if href|default(false) %}
  188. <a
  189. href=\"{{ storyblok.storyblokLink(href)|spaceless }}\"
  190. {% if target is defined and target != \"\" %}target=\"{{ target }}\"{% endif %}
  191. class=\"{{ class|default('text-link') }} {{ modifier|default('') }}\"
  192. {{ attributes|default([])|getAttributes }}
  193. {{ (gtm|default(false) ? gtm : '') }}
  194. >
  195. {{ inner }}
  196. </a>
  197. {% else %}
  198. <span class=\"{{ class|default('text-link') }} {{ modifier|default('') }}\" {{ attributes|default([])|getAttributes }} {{ (gtm|default(false) ? gtm : '') }}>
  199. {{ inner }}
  200. </span>
  201. {% endif %}
  202. ", "components/atoms/text-link/text-link.html.twig", "/var/www/html/templates/default/components/atoms/text-link/text-link.html.twig");
  203. }
  204. }