var/cache/dev/twig/28/28a2c632a25df1c93580a97baa11c1ea.php line 38

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. /* themes/theme/casestudies/featured.html.twig */
  16. class __TwigTemplate_032842636bfeb3ca891755c5c6a114ea 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. }
  31. protected function doDisplay(array $context, array $blocks = []): iterable
  32. {
  33. $macros = $this->macros;
  34. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "themes/theme/casestudies/featured.html.twig"));
  36. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "themes/theme/casestudies/featured.html.twig"));
  38. // line 1
  39. 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)) {
  40. // line 2
  41. yield "<div class=\"featured-case-studies\">
  42. ";
  43. // line 3
  44. $context['_parent'] = $context;
  45. $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); })()));
  46. foreach ($context['_seq'] as $context["_key"] => $context["study"]) {
  47. // line 4
  48. yield " <a class=\"featured-case-study\" href=\"";
  49. 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);
  50. yield "\">
  51. <div class=\"featured-case-study__image\">
  52. ";
  53. // line 6
  54. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["study"], "logo", [], "any", false, false, false, 6)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  55. // line 7
  56. yield " <img src=\"";
  57. 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);
  58. yield "\" alt=\"";
  59. 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);
  60. yield "\">
  61. ";
  62. } else {
  63. // line 9
  64. yield " <img class=\"no-max\" src=\"";
  65. 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);
  66. yield "\" alt=\"";
  67. 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);
  68. yield "\">
  69. ";
  70. }
  71. // line 11
  72. yield " </div>
  73. <h4 class=\"text-heading-4\">";
  74. // line 12
  75. 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);
  76. yield "</h4>
  77. </a>
  78. ";
  79. }
  80. $_parent = $context['_parent'];
  81. unset($context['_seq'], $context['_key'], $context['study'], $context['_parent']);
  82. $context = array_intersect_key($context, $_parent) + $_parent;
  83. // line 15
  84. yield "</div>
  85. ";
  86. }
  87. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  88. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  89. yield from [];
  90. }
  91. /**
  92. * @codeCoverageIgnore
  93. */
  94. public function getTemplateName(): string
  95. {
  96. return "themes/theme/casestudies/featured.html.twig";
  97. }
  98. /**
  99. * @codeCoverageIgnore
  100. */
  101. public function isTraitable(): bool
  102. {
  103. return false;
  104. }
  105. /**
  106. * @codeCoverageIgnore
  107. */
  108. public function getDebugInfo(): array
  109. {
  110. return array ( 93 => 15, 84 => 12, 81 => 11, 73 => 9, 65 => 7, 63 => 6, 57 => 4, 53 => 3, 50 => 2, 48 => 1,);
  111. }
  112. public function getSourceContext(): Source
  113. {
  114. return new Source("{% if studies|length > 0 %}
  115. <div class=\"featured-case-studies\">
  116. {% for study in studies %}
  117. <a class=\"featured-case-study\" href=\"{{generatePath( app.request, study.linkedPageId, {'casestudy_slug': study.slug} )}}\">
  118. <div class=\"featured-case-study__image\">
  119. {% if study.logo %}
  120. <img src=\"{{ imageCache('/userfiles/images/casestudies/' ~ study.logo, 'cropResize', 320, 160) }}\" alt=\"{{ study.quote}}\">
  121. {% else %}
  122. <img class=\"no-max\" src=\"{{ imageCache('/' ~ study.getFullImagePath, 'zoomCrop', 576, 384) }}\" alt=\"{{ study.quote }}\">
  123. {% endif %}
  124. </div>
  125. <h4 class=\"text-heading-4\">{{ study.title }}</h4>
  126. </a>
  127. {% endfor %}
  128. </div>
  129. {% endif %}
  130. ", "themes/theme/casestudies/featured.html.twig", "/var/www/html/t/taurushr/templates/themes/theme/casestudies/featured.html.twig");
  131. }
  132. }