var/cache/dev/twig/f9/f9966ffb063570c95fda19419ee8455a.php line 108

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/image-list/image-list.html.twig */
  16. class __TwigTemplate_32129861bf26948864db87519c0cd9d0 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. 'entries' => [$this, 'block_entries'],
  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/molecules/image-list/image-list.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/molecules/image-list/image-list.html.twig"));
  39. // line 1
  40. if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), ((array_key_exists("entries", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 1, $this->source); })()))) : (""))) > 0)) {
  41. // line 2
  42. yield " <ul class=\"image-list ";
  43. 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.', 2, $this->source); })()))) : ("")), "html", null, true);
  44. yield "\">
  45. ";
  46. // line 3
  47. yield from $this->unwrap()->yieldBlock('entries', $context, $blocks);
  48. // line 41
  49. yield " </ul>
  50. ";
  51. }
  52. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  53. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  54. yield from [];
  55. }
  56. // line 3
  57. /**
  58. * @return iterable<null|scalar|\Stringable>
  59. */
  60. public function block_entries(array $context, array $blocks = []): iterable
  61. {
  62. $macros = $this->macros;
  63. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  64. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entries"));
  65. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  66. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entries"));
  67. // line 4
  68. yield " ";
  69. $context['_parent'] = $context;
  70. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 4, $this->source); })()));
  71. $context['loop'] = [
  72. 'parent' => $context['_parent'],
  73. 'index0' => 0,
  74. 'index' => 1,
  75. 'first' => true,
  76. ];
  77. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  78. $length = count($context['_seq']);
  79. $context['loop']['revindex0'] = $length - 1;
  80. $context['loop']['revindex'] = $length;
  81. $context['loop']['length'] = $length;
  82. $context['loop']['last'] = 1 === $length;
  83. }
  84. foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
  85. // line 5
  86. yield " <li class=\"image-list__entry\">
  87. ";
  88. // line 6
  89. if (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "component", [], "any", true, true, false, 6)) {
  90. // line 7
  91. yield " ";
  92. yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, $context["entry"], ["class" => "image-list__image", "objectFit" => (( // line 9
  93. array_key_exists("objectFit", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["objectFit"]) || array_key_exists("objectFit", $context) ? $context["objectFit"] : (function () { throw new RuntimeError('Variable "objectFit" does not exist.', 9, $this->source); })()))) : (""))]);
  94. // line 10
  95. yield "
  96. ";
  97. } elseif (CoreExtension::getAttribute($this->env, $this->source, // line 11
  98. $context["entry"], "href", [], "any", true, true, false, 11)) {
  99. // line 12
  100. yield " <a href=\"";
  101. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "href", [], "any", true, true, false, 12)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "href", [], "any", false, false, false, 12))) : ("")), "html", null, true);
  102. yield "\" class=\"image-list__link\">
  103. ";
  104. // line 13
  105. yield from $this->load("components/atoms/image/image.html.twig", 13)->unwrap()->yield(CoreExtension::merge($context, ["src" => ((CoreExtension::getAttribute($this->env, $this->source, // line 14
  106. $context["entry"], "src", [], "any", true, true, false, 14)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "src", [], "any", false, false, false, 14))) : ("")), "alt" => ((CoreExtension::getAttribute($this->env, $this->source, // line 15
  107. $context["entry"], "alt", [], "any", true, true, false, 15)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "alt", [], "any", false, false, false, 15))) : ("")), "class" => "image-list__image"]));
  108. // line 18
  109. yield " </a>
  110. ";
  111. } elseif (( // line 19
  112. array_key_exists("height", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["height"]) || array_key_exists("height", $context) ? $context["height"] : (function () { throw new RuntimeError('Variable "height" does not exist.', 19, $this->source); })())))) {
  113. // line 20
  114. yield " ";
  115. yield from $this->load("components/atoms/image/image.html.twig", 20)->unwrap()->yield(CoreExtension::merge($context, ["src" => Twig\Extension\CoreExtension::default(((CoreExtension::getAttribute($this->env, $this->source, // line 21
  116. $context["entry"], "src", [], "any", true, true, false, 21)) ? (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "src", [], "any", false, false, false, 21)) : (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "uri", [], "any", false, false, false, 21)))), "alt" => Twig\Extension\CoreExtension::default(((CoreExtension::getAttribute($this->env, $this->source, // line 22
  117. $context["entry"], "alt", [], "any", true, true, false, 22)) ? (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "alt", [], "any", false, false, false, 22)) : (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "text", [], "any", false, false, false, 22)))), "class" => "image-list__image", "height" => (( // line 24
  118. array_key_exists("height", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["height"]) || array_key_exists("height", $context) ? $context["height"] : (function () { throw new RuntimeError('Variable "height" does not exist.', 24, $this->source); })()))) : (""))]));
  119. // line 26
  120. yield " ";
  121. } else {
  122. // line 27
  123. yield " ";
  124. yield from $this->load("components/atoms/image/image.html.twig", 27)->unwrap()->yield(CoreExtension::merge($context, ["src" => Twig\Extension\CoreExtension::default(((CoreExtension::getAttribute($this->env, $this->source, // line 28
  125. $context["entry"], "src", [], "any", true, true, false, 28)) ? (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "src", [], "any", false, false, false, 28)) : (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "uri", [], "any", false, false, false, 28)))), "alt" => Twig\Extension\CoreExtension::default(((CoreExtension::getAttribute($this->env, $this->source, // line 29
  126. $context["entry"], "alt", [], "any", true, true, false, 29)) ? (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "alt", [], "any", false, false, false, 29)) : (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "text", [], "any", false, false, false, 29)))), "class" => "image-list__image", "width" => (( // line 31
  127. array_key_exists("width", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["width"]) || array_key_exists("width", $context) ? $context["width"] : (function () { throw new RuntimeError('Variable "width" does not exist.', 31, $this->source); })()))) : ("")), "objectFit" => (( // line 32
  128. array_key_exists("objectFit", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["objectFit"]) || array_key_exists("objectFit", $context) ? $context["objectFit"] : (function () { throw new RuntimeError('Variable "objectFit" does not exist.', 32, $this->source); })()))) : (""))]));
  129. // line 34
  130. yield " ";
  131. }
  132. // line 35
  133. yield " ";
  134. if (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "description", [], "any", true, true, false, 35)) {
  135. // line 36
  136. yield " <div class=\"image-list__description\">";
  137. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "description", [], "any", false, false, false, 36), "html", null, true);
  138. yield "</div>
  139. ";
  140. }
  141. // line 38
  142. yield " </li>
  143. ";
  144. ++$context['loop']['index0'];
  145. ++$context['loop']['index'];
  146. $context['loop']['first'] = false;
  147. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  148. --$context['loop']['revindex0'];
  149. --$context['loop']['revindex'];
  150. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  151. }
  152. }
  153. $_parent = $context['_parent'];
  154. unset($context['_seq'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
  155. $context = array_intersect_key($context, $_parent) + $_parent;
  156. // line 40
  157. yield " ";
  158. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  159. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  160. yield from [];
  161. }
  162. /**
  163. * @codeCoverageIgnore
  164. */
  165. public function getTemplateName(): string
  166. {
  167. return "components/molecules/image-list/image-list.html.twig";
  168. }
  169. /**
  170. * @codeCoverageIgnore
  171. */
  172. public function isTraitable(): bool
  173. {
  174. return false;
  175. }
  176. /**
  177. * @codeCoverageIgnore
  178. */
  179. public function getDebugInfo(): array
  180. {
  181. return array ( 173 => 40, 158 => 38, 152 => 36, 149 => 35, 146 => 34, 144 => 32, 143 => 31, 142 => 29, 141 => 28, 139 => 27, 136 => 26, 134 => 24, 133 => 22, 132 => 21, 130 => 20, 128 => 19, 125 => 18, 123 => 15, 122 => 14, 121 => 13, 116 => 12, 114 => 11, 111 => 10, 109 => 9, 107 => 7, 105 => 6, 102 => 5, 84 => 4, 71 => 3, 58 => 41, 56 => 3, 51 => 2, 49 => 1,);
  182. }
  183. public function getSourceContext(): Source
  184. {
  185. return new Source("{% if entries|default|length > 0 %}
  186. <ul class=\"image-list {{ class|default }}\">
  187. {% block entries %}
  188. {% for entry in entries %}
  189. <li class=\"image-list__entry\">
  190. {% if entry.component is defined %}
  191. {{ render_storyblok(entry, {
  192. 'class': 'image-list__image',
  193. 'objectFit': objectFit | default
  194. }) }}
  195. {% elseif entry.href is defined %}
  196. <a href=\"{{ entry.href|default }}\" class=\"image-list__link\">
  197. {% include 'components/atoms/image/image.html.twig' with {
  198. 'src': entry.src|default,
  199. 'alt': entry.alt|default,
  200. 'class': 'image-list__image'
  201. } %}
  202. </a>
  203. {% elseif height is defined and height is not empty %}
  204. {% include 'components/atoms/image/image.html.twig' with {
  205. 'src': (entry.src is defined ? entry.src : entry.uri) | default,
  206. 'alt': (entry.alt is defined ? entry.alt : entry.text) | default,
  207. 'class': 'image-list__image',
  208. 'height': height | default,
  209. } %}
  210. {% else %}
  211. {% include 'components/atoms/image/image.html.twig' with {
  212. 'src': (entry.src is defined ? entry.src : entry.uri) | default,
  213. 'alt': (entry.alt is defined ? entry.alt : entry.text) | default,
  214. 'class': 'image-list__image',
  215. 'width': width | default,
  216. 'objectFit': objectFit | default
  217. } %}
  218. {% endif %}
  219. {% if entry.description is defined %}
  220. <div class=\"image-list__description\">{{ entry.description }}</div>
  221. {% endif %}
  222. </li>
  223. {% endfor %}
  224. {% endblock %}
  225. </ul>
  226. {% endif %}
  227. ", "components/molecules/image-list/image-list.html.twig", "/var/www/html/templates/default/components/molecules/image-list/image-list.html.twig");
  228. }
  229. }