<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* components/molecules/image-list/image-list.html.twig */
class __TwigTemplate_32129861bf26948864db87519c0cd9d0 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'entries' => [$this, 'block_entries'],
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "components/molecules/image-list/image-list.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "components/molecules/image-list/image-list.html.twig"));
// line 1
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)) {
// line 2
yield " <ul class=\"image-list ";
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);
yield "\">
";
// line 3
yield from $this->unwrap()->yieldBlock('entries', $context, $blocks);
// line 41
yield " </ul>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_entries(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entries"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entries"));
// line 4
yield " ";
$context['_parent'] = $context;
$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); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
// line 5
yield " <li class=\"image-list__entry\">
";
// line 6
if (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "component", [], "any", true, true, false, 6)) {
// line 7
yield " ";
yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, $context["entry"], ["class" => "image-list__image", "objectFit" => (( // line 9
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); })()))) : (""))]);
// line 10
yield "
";
} elseif (CoreExtension::getAttribute($this->env, $this->source, // line 11
$context["entry"], "href", [], "any", true, true, false, 11)) {
// line 12
yield " <a href=\"";
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);
yield "\" class=\"image-list__link\">
";
// line 13
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
$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
$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"]));
// line 18
yield " </a>
";
} elseif (( // line 19
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); })())))) {
// line 20
yield " ";
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
$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
$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
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); })()))) : (""))]));
// line 26
yield " ";
} else {
// line 27
yield " ";
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
$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
$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
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
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); })()))) : (""))]));
// line 34
yield " ";
}
// line 35
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "description", [], "any", true, true, false, 35)) {
// line 36
yield " <div class=\"image-list__description\">";
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);
yield "</div>
";
}
// line 38
yield " </li>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 40
yield " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "components/molecules/image-list/image-list.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% if entries|default|length > 0 %}
<ul class=\"image-list {{ class|default }}\">
{% block entries %}
{% for entry in entries %}
<li class=\"image-list__entry\">
{% if entry.component is defined %}
{{ render_storyblok(entry, {
'class': 'image-list__image',
'objectFit': objectFit | default
}) }}
{% elseif entry.href is defined %}
<a href=\"{{ entry.href|default }}\" class=\"image-list__link\">
{% include 'components/atoms/image/image.html.twig' with {
'src': entry.src|default,
'alt': entry.alt|default,
'class': 'image-list__image'
} %}
</a>
{% elseif height is defined and height is not empty %}
{% include 'components/atoms/image/image.html.twig' with {
'src': (entry.src is defined ? entry.src : entry.uri) | default,
'alt': (entry.alt is defined ? entry.alt : entry.text) | default,
'class': 'image-list__image',
'height': height | default,
} %}
{% else %}
{% include 'components/atoms/image/image.html.twig' with {
'src': (entry.src is defined ? entry.src : entry.uri) | default,
'alt': (entry.alt is defined ? entry.alt : entry.text) | default,
'class': 'image-list__image',
'width': width | default,
'objectFit': objectFit | default
} %}
{% endif %}
{% if entry.description is defined %}
<div class=\"image-list__description\">{{ entry.description }}</div>
{% endif %}
</li>
{% endfor %}
{% endblock %}
</ul>
{% endif %}
", "components/molecules/image-list/image-list.html.twig", "/var/www/html/templates/default/components/molecules/image-list/image-list.html.twig");
}
}