var/cache/dev/twig/be/bea965949924d211ad0e450ab477fce5.php line 40

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. /* content/spnsoren/view.html.twig */
  16. class __TwigTemplate_04f2c7b081d23bac9f41fafc953343a4 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. $this->sandbox = $this->extensions[SandboxExtension::class];
  31. $this->checkSecurity();
  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", "content/spnsoren/view.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", "content/spnsoren/view.html.twig"));
  40. // line 1
  41. $context["items"] = $this->extensions['App\Twig\Extension\UtilsExtension']->sponsorList(5);
  42. // line 2
  43. yield "
  44. ";
  45. // line 3
  46. $context['_parent'] = $context;
  47. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 3, $this->source); })()));
  48. foreach ($context['_seq'] as $context["_key"] => $context["sponsor"]) {
  49. // line 4
  50. yield " <div class=\"sponsor\">
  51. <h4>
  52. ";
  53. // line 6
  54. if (CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "homepage", [], "any", false, false, true, 6)) {
  55. // line 7
  56. yield " <a href=\"";
  57. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "homepage", [], "any", false, false, true, 7), "direct", [], "any", false, false, true, 7), 7, $this->source), "html", null, true);
  58. yield "\" target=\"";
  59. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "homepage", [], "any", false, false, true, 7), "target", [], "any", false, false, true, 7), 7, $this->source), "html", null, true);
  60. yield "\" title=\"Zur Homepage ";
  61. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "name", [], "any", false, false, true, 7), 7, $this->source), "html", null, true);
  62. yield "\">
  63. ";
  64. // line 8
  65. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "name", [], "any", false, false, true, 8), 8, $this->source), "html", null, true);
  66. yield "
  67. </a>
  68. ";
  69. } else {
  70. // line 11
  71. yield " ";
  72. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "name", [], "any", false, false, true, 11), 11, $this->source), "html", null, true);
  73. yield "
  74. ";
  75. }
  76. // line 13
  77. yield " </h4>
  78. ";
  79. // line 15
  80. $context["image"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
  81. // line 16
  82. yield " ";
  83. if (CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "logo", [], "any", false, false, true, 16)) {
  84. // line 17
  85. yield " <figure>
  86. ";
  87. // line 18
  88. yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "logo", [], "any", false, false, true, 18), "thumbnail", ["sponsor-logo"], "method", false, false, true, 18), "html", [], "any", false, false, true, 18), 18, $this->source);
  89. yield "
  90. </figure>
  91. ";
  92. }
  93. // line 21
  94. yield " ";
  95. yield from [];
  96. })())) ? '' : new Markup($tmp, $this->env->getCharset());
  97. // line 22
  98. yield " ";
  99. if (CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "homepage", [], "any", false, false, true, 22)) {
  100. // line 23
  101. yield " <a href=\"";
  102. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "homepage", [], "any", false, false, true, 23), "direct", [], "any", false, false, true, 23), 23, $this->source), "html", null, true);
  103. yield "\" target=\"";
  104. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "homepage", [], "any", false, false, true, 23), "target", [], "any", false, false, true, 23), 23, $this->source), "html", null, true);
  105. yield "\" title=\"Zur Homepage ";
  106. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "name", [], "any", false, false, true, 23), 23, $this->source), "html", null, true);
  107. yield "\">
  108. ";
  109. // line 24
  110. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 24, $this->source); })()), 24, $this->source), "html", null, true);
  111. yield "
  112. </a>
  113. ";
  114. } else {
  115. // line 27
  116. yield " ";
  117. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 27, $this->source); })()), 27, $this->source), "html", null, true);
  118. yield "
  119. ";
  120. }
  121. // line 29
  122. yield " ";
  123. yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["sponsor"], "description", [], "any", false, false, true, 29), 29, $this->source);
  124. yield "
  125. </div>";
  126. }
  127. $_parent = $context['_parent'];
  128. unset($context['_seq'], $context['_key'], $context['sponsor'], $context['_parent']);
  129. $context = array_intersect_key($context, $_parent) + $_parent;
  130. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  131. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  132. yield from [];
  133. }
  134. /**
  135. * @codeCoverageIgnore
  136. */
  137. public function getTemplateName(): string
  138. {
  139. return "content/spnsoren/view.html.twig";
  140. }
  141. /**
  142. * @codeCoverageIgnore
  143. */
  144. public function isTraitable(): bool
  145. {
  146. return false;
  147. }
  148. /**
  149. * @codeCoverageIgnore
  150. */
  151. public function getDebugInfo(): array
  152. {
  153. return array ( 132 => 29, 126 => 27, 120 => 24, 111 => 23, 108 => 22, 104 => 21, 98 => 18, 95 => 17, 92 => 16, 90 => 15, 86 => 13, 80 => 11, 74 => 8, 65 => 7, 63 => 6, 59 => 4, 55 => 3, 52 => 2, 50 => 1,);
  154. }
  155. public function getSourceContext(): Source
  156. {
  157. return new Source("{% set items = sponsorList(5) %}
  158. {% for sponsor in items %}
  159. <div class=\"sponsor\">
  160. <h4>
  161. {% if sponsor.homepage %}
  162. <a href=\"{{ sponsor.homepage.direct }}\" target=\"{{ sponsor.homepage.target }}\" title=\"Zur Homepage {{ sponsor.name }}\">
  163. {{ sponsor.name }}
  164. </a>
  165. {% else %}
  166. {{ sponsor.name }}
  167. {% endif %}
  168. </h4>
  169. {% set image %}
  170. {% if sponsor.logo %}
  171. <figure>
  172. {{ sponsor.logo.thumbnail('sponsor-logo').html|raw }}
  173. </figure>
  174. {% endif %}
  175. {% endset %}
  176. {% if sponsor.homepage %}
  177. <a href=\"{{ sponsor.homepage.direct }}\" target=\"{{ sponsor.homepage.target }}\" title=\"Zur Homepage {{ sponsor.name }}\">
  178. {{ image }}
  179. </a>
  180. {% else %}
  181. {{ image }}
  182. {% endif %}
  183. {{ sponsor.description|raw }}
  184. </div>{% endfor %}
  185. ", "content/spnsoren/view.html.twig", "/var/www/vhosts/mensa-fasching.de/uat/releases/20250218080531/templates/content/spnsoren/view.html.twig");
  186. }
  187. public function checkSecurity()
  188. {
  189. static $tags = ["set" => 1, "for" => 3, "if" => 6];
  190. static $filters = ["escape" => 7, "raw" => 18];
  191. static $functions = ["sponsorList" => 1];
  192. try {
  193. $this->sandbox->checkSecurity(
  194. ['set', 'for', 'if'],
  195. ['escape', 'raw'],
  196. ['sponsorList'],
  197. $this->source
  198. );
  199. } catch (SecurityError $e) {
  200. $e->setSourceContext($this->source);
  201. if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  202. $e->setTemplateLine($tags[$e->getTagName()]);
  203. } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  204. $e->setTemplateLine($filters[$e->getFilterName()]);
  205. } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  206. $e->setTemplateLine($functions[$e->getFunctionName()]);
  207. }
  208. throw $e;
  209. }
  210. }
  211. }