<?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;
/* themes/theme/casestudies/featured.html.twig */
class __TwigTemplate_032842636bfeb3ca891755c5c6a114ea 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 = [
];
}
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", "themes/theme/casestudies/featured.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "themes/theme/casestudies/featured.html.twig"));
// line 1
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["studies"]) || array_key_exists("studies", $context) ? $context["studies"] : (function () { throw new RuntimeError('Variable "studies" does not exist.', 1, $this->source); })())) > 0)) {
// line 2
yield "<div class=\"featured-case-studies\">
";
// line 3
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["studies"]) || array_key_exists("studies", $context) ? $context["studies"] : (function () { throw new RuntimeError('Variable "studies" does not exist.', 3, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["study"]) {
// line 4
yield " <a class=\"featured-case-study\" href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('generatePath')->getCallable()(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.', 4, $this->source); })()), "request", [], "any", false, false, false, 4), CoreExtension::getAttribute($this->env, $this->source, $context["study"], "linkedPageId", [], "any", false, false, false, 4), ["casestudy_slug" => CoreExtension::getAttribute($this->env, $this->source, $context["study"], "slug", [], "any", false, false, false, 4)]), "html", null, true);
yield "\">
<div class=\"featured-case-study__image\">
";
// line 6
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["study"], "logo", [], "any", false, false, false, 6)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 7
yield " <img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/userfiles/images/casestudies/" . CoreExtension::getAttribute($this->env, $this->source, $context["study"], "logo", [], "any", false, false, false, 7)), "cropResize", 320, 160), "html", null, true);
yield "\" alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["study"], "quote", [], "any", false, false, false, 7), "html", null, true);
yield "\">
";
} else {
// line 9
yield " <img class=\"no-max\" src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/" . CoreExtension::getAttribute($this->env, $this->source, $context["study"], "getFullImagePath", [], "any", false, false, false, 9)), "zoomCrop", 576, 384), "html", null, true);
yield "\" alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["study"], "quote", [], "any", false, false, false, 9), "html", null, true);
yield "\">
";
}
// line 11
yield " </div>
<h4 class=\"text-heading-4\">";
// line 12
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["study"], "title", [], "any", false, false, false, 12), "html", null, true);
yield "</h4>
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['study'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 15
yield "</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "themes/theme/casestudies/featured.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 93 => 15, 84 => 12, 81 => 11, 73 => 9, 65 => 7, 63 => 6, 57 => 4, 53 => 3, 50 => 2, 48 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% if studies|length > 0 %}
<div class=\"featured-case-studies\">
{% for study in studies %}
<a class=\"featured-case-study\" href=\"{{generatePath( app.request, study.linkedPageId, {'casestudy_slug': study.slug} )}}\">
<div class=\"featured-case-study__image\">
{% if study.logo %}
<img src=\"{{ imageCache('/userfiles/images/casestudies/' ~ study.logo, 'cropResize', 320, 160) }}\" alt=\"{{ study.quote}}\">
{% else %}
<img class=\"no-max\" src=\"{{ imageCache('/' ~ study.getFullImagePath, 'zoomCrop', 576, 384) }}\" alt=\"{{ study.quote }}\">
{% endif %}
</div>
<h4 class=\"text-heading-4\">{{ study.title }}</h4>
</a>
{% endfor %}
</div>
{% endif %}
", "themes/theme/casestudies/featured.html.twig", "/var/www/html/t/taurushr/templates/themes/theme/casestudies/featured.html.twig");
}
}