var/cache/dev/twig/fb/fb0e8c9ae729c756c7ac681f812e0043.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. /* components/NewsThumbnail.html.twig */
  16. class __TwigTemplate_98cb3d8dda15795da925e43de53b1346 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", "components/NewsThumbnail.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", "components/NewsThumbnail.html.twig"));
  38. // line 1
  39. yield "<a
  40. class=\"news-thumbnail\"
  41. href=\"";
  42. // line 3
  43. 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.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 3, $this->source); })()), "linkedPageId", [], "any", false, false, false, 3), ["news_slug" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 3, $this->source); })()), "slug", [], "any", false, false, false, 3)]), "html", null, true);
  44. yield "\"
  45. >
  46. <img
  47. class=\"news-thumbnail__image\"
  48. src=\"";
  49. // line 7
  50. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 7, $this->source); })()), "getFullImagePath", [], "any", false, false, false, 7)), "zoomCrop", 1200, 900), "html", null, true);
  51. yield "\"
  52. alt=\"";
  53. // line 8
  54. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 8, $this->source); })()), "title", [], "any", false, false, false, 8), "html", null, true);
  55. yield "\"
  56. loading=\"lazy\"
  57. >
  58. <h2 class=\"news-thumbnail__title\">";
  59. // line 11
  60. yield (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 11, $this->source); })()), "isActive", [], "any", false, false, false, 11) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 11, $this->source); })()), "publishDate", [], "any", false, false, false, 11) <= $this->extensions['Twig\Extension\CoreExtension']->convertDate()))) ? ("") : ("PREVIEW - "));
  61. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 11, $this->source); })()), "title", [], "any", false, false, false, 11), "html", null, true);
  62. yield "</h2>
  63. <span class=\"news-thumbnail__date\">";
  64. // line 13
  65. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 13, $this->source); })()), "publishDate", [], "any", false, false, false, 13), "d F Y"), "html", null, true);
  66. // line 14
  67. yield "</span>
  68. <p class=\"news-thumbnail__excerpt\">";
  69. // line 16
  70. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 16, $this->source); })()), "excerpt", [], "any", false, false, false, 16)), "html", null, true);
  71. // line 17
  72. yield "</p>
  73. <div class=\"news-thumbnail__footer\">
  74. <span class=\"news-thumbnail__read-more\"
  75. >Read More <span class=\"sr-only\">about ";
  76. // line 20
  77. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 20, $this->source); })()), "title", [], "any", false, false, false, 20), "html", null, true);
  78. yield "</span> <i class=\"fa-regular fa-angle-right\"></i
  79. ></span>
  80. </div>
  81. </a>
  82. ";
  83. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  84. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  85. yield from [];
  86. }
  87. /**
  88. * @codeCoverageIgnore
  89. */
  90. public function getTemplateName(): string
  91. {
  92. return "components/NewsThumbnail.html.twig";
  93. }
  94. /**
  95. * @codeCoverageIgnore
  96. */
  97. public function isTraitable(): bool
  98. {
  99. return false;
  100. }
  101. /**
  102. * @codeCoverageIgnore
  103. */
  104. public function getDebugInfo(): array
  105. {
  106. return array ( 86 => 20, 81 => 17, 79 => 16, 76 => 14, 74 => 13, 69 => 11, 63 => 8, 59 => 7, 52 => 3, 48 => 1,);
  107. }
  108. public function getSourceContext(): Source
  109. {
  110. return new Source("<a
  111. class=\"news-thumbnail\"
  112. href=\"{{generatePath( app.request, article.linkedPageId, {'news_slug' : article.slug } ) }}\"
  113. >
  114. <img
  115. class=\"news-thumbnail__image\"
  116. src=\"{{ imageCache('/' ~ article.getFullImagePath, 'zoomCrop', 1200, 900) }}\"
  117. alt=\"{{ article.title }}\"
  118. loading=\"lazy\"
  119. >
  120. <h2 class=\"news-thumbnail__title\">{{ article.isActive and article.publishDate <= date() ? '' : 'PREVIEW - ' }}{{ article.title }}</h2>
  121. <span class=\"news-thumbnail__date\">
  122. {{- article.publishDate | date('d F Y') -}}
  123. </span>
  124. <p class=\"news-thumbnail__excerpt\">
  125. {{- article.excerpt | striptags -}}
  126. </p>
  127. <div class=\"news-thumbnail__footer\">
  128. <span class=\"news-thumbnail__read-more\"
  129. >Read More <span class=\"sr-only\">about {{ article.title }}</span> <i class=\"fa-regular fa-angle-right\"></i
  130. ></span>
  131. </div>
  132. </a>
  133. ", "components/NewsThumbnail.html.twig", "/var/www/html/t/taurushr/templates/components/NewsThumbnail.html.twig");
  134. }
  135. }