var/cache/dev/twig/fd/fdaea3a91a0ac402197dd4296d87ec05.php line 150

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. /* @theme/news/embedNewsArticle.html.twig */
  16. class __TwigTemplate_e45ef693ee0e5e5bcf9daa4eefc7d24d 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", "@theme/news/embedNewsArticle.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", "@theme/news/embedNewsArticle.html.twig"));
  38. // line 1
  39. yield "<script type=\"application/ld+json\">
  40. {
  41. \"@context\": \"https://schema.org\",
  42. \"@type\": \"BlogPosting\",
  43. \"headline\": \"";
  44. // line 5
  45. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 5, $this->source); })()), "title", [], "any", false, false, false, 5), "html", null, true);
  46. yield "\",
  47. \"alternativeHeadline\": \"";
  48. // line 6
  49. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 6, $this->source); })()), "subtitle", [], "any", false, false, false, 6)), "html", null, true);
  50. yield "\",
  51. \"datePublished\": \"";
  52. // line 7
  53. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 7, $this->source); })()), "publishDate", [], "any", false, false, false, 7), "c"), "html", null, true);
  54. yield "\",
  55. \"dateModified\": \"";
  56. // line 8
  57. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 8, $this->source); })()), "updatedAt", [], "any", false, false, false, 8), "c"), "html", null, true);
  58. yield "\",
  59. \"author\": {
  60. \"@type\": \"Organization\",
  61. \"name\": \"";
  62. // line 11
  63. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["sitename"]) || array_key_exists("sitename", $context) ? $context["sitename"] : (function () { throw new RuntimeError('Variable "sitename" does not exist.', 11, $this->source); })()), "html", null, true);
  64. yield "\"
  65. },
  66. \"publisher\": {
  67. \"@type\": \"Organization\",
  68. \"name\": \"";
  69. // line 15
  70. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["sitename"]) || array_key_exists("sitename", $context) ? $context["sitename"] : (function () { throw new RuntimeError('Variable "sitename" does not exist.', 15, $this->source); })()), "html", null, true);
  71. yield "\",
  72. \"logo\": {
  73. \"@type\": \"ImageObject\",
  74. \"url\": \"";
  75. // line 18
  76. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["siteurl"]) || array_key_exists("siteurl", $context) ? $context["siteurl"] : (function () { throw new RuntimeError('Variable "siteurl" does not exist.', 18, $this->source); })()), "html", null, true);
  77. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/logo.png"), "cropResize", 560, 120), "html", null, true);
  78. yield "\",
  79. \"width\": 560,
  80. \"height\": 120
  81. }
  82. },
  83. \"image\": {
  84. \"@type\": \"ImageObject\",
  85. \"url\": \"";
  86. // line 25
  87. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["siteurl"]) || array_key_exists("siteurl", $context) ? $context["siteurl"] : (function () { throw new RuntimeError('Variable "siteurl" does not exist.', 25, $this->source); })()), "html", null, true);
  88. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/userfiles/images/news/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 25, $this->source); })()), "image", [], "any", false, false, false, 25)), "zoomCrop", 800, 600), "html", null, true);
  89. yield "\",
  90. \"width\": 800,
  91. \"height\": 600
  92. },
  93. \"description\": \"";
  94. // line 29
  95. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 29, $this->source); })()), "excerpt", [], "any", false, false, false, 29)), "html", null, true);
  96. yield "\",
  97. \"articleBody\": \"";
  98. // line 30
  99. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags(Twig\Extension\CoreExtension::replace(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 30, $this->source); })()), "content", [], "any", false, false, false, 30), ["
  100. " => " ", " " => " "])), "html", null, true);
  101. yield "\"
  102. }
  103. </script>
  104. <div class=\"page-hero page-hero--themed page-hero--no-bg page-hero--fade-out news-article__hero\">
  105. <div class=\"container\">
  106. <div class=\"page-hero__content ";
  107. // line 36
  108. if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 36, $this->source); })()), "image", [], "any", false, false, false, 36) == null)) {
  109. yield "!col-span-12";
  110. }
  111. yield "\">";
  112. // line 37
  113. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('breadcrumbs')->getCallable()((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 37, $this->source); })()), $this->env->getFunction('domCheckIgnore')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, 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.', 37, $this->source); })()), "request", [], "any", false, false, false, 37), "pathinfo", [], "any", false, false, false, 37))), "html", null, true);
  114. // line 38
  115. yield "<p class=\"text-sm mb-2\">";
  116. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 38, $this->source); })()), "publishDate", [], "any", false, false, false, 38), "d F Y"), "html", null, true);
  117. yield "</p>
  118. <h1 class=\"page-hero__title\">
  119. ";
  120. // line 40
  121. yield $this->env->getFunction('allowInlineEditor')->getCallable()((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 40, $this->source); })()), "title");
  122. yield "
  123. </h1>
  124. <div class=\"page-hero__subtitle\">
  125. ";
  126. // line 43
  127. yield $this->env->getFunction('allowInlineEditor')->getCallable()((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 43, $this->source); })()), "subtitle");
  128. // line 44
  129. yield "</div>
  130. </div>
  131. ";
  132. // line 46
  133. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 46, $this->source); })()), "image", [], "any", false, false, false, 46)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  134. // line 47
  135. yield " <div class=\"page-hero__image\">
  136. <img
  137. src=\"";
  138. // line 49
  139. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 49, $this->source); })()), "getFullImagePath", [], "any", false, false, false, 49)), "zoomCrop", 1700, 700), "html", null, true);
  140. yield "\"
  141. alt=\"";
  142. // line 50
  143. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 50, $this->source); })()), "title", [], "any", false, false, false, 50), "html", null, true);
  144. yield "\"
  145. >
  146. </div>
  147. ";
  148. }
  149. // line 54
  150. yield " </div>
  151. </div>
  152. </div>
  153. <article class=\"news-article\">
  154. <div class=\"container\">
  155. <div class=\"news-article__content cms-area\">
  156. ";
  157. // line 60
  158. yield (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 60, $this->source); })()), "isActive", [], "any", false, false, false, 60) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 60, $this->source); })()), "publishDate", [], "any", false, false, false, 60) <= $this->extensions['Twig\Extension\CoreExtension']->convertDate()))) ? ("") : ("<h2>PREVIEW - Article not active</h2>"));
  159. yield "
  160. ";
  161. // line 61
  162. yield $this->env->getFunction('allowInlineEditor')->getCallable()((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 61, $this->source); })()), "content");
  163. yield "
  164. ";
  165. // line 62
  166. if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 62, $this->source); })()), "ctaText", [], "any", false, false, false, 62) && CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 62, $this->source); })()), "ctaLink", [], "any", false, false, false, 62))) {
  167. // line 63
  168. yield " <a href=\"";
  169. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 63, $this->source); })()), "ctaLink", [], "any", false, false, false, 63), "html", null, true);
  170. yield "\" class=\"button mt-10\">";
  171. // line 64
  172. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 64, $this->source); })()), "ctaText", [], "any", false, false, false, 64), "html", null, true);
  173. // line 65
  174. yield "</a>
  175. ";
  176. }
  177. // line 67
  178. yield " </div>
  179. </div>
  180. </article>
  181. ";
  182. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  183. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  184. yield from [];
  185. }
  186. /**
  187. * @codeCoverageIgnore
  188. */
  189. public function getTemplateName(): string
  190. {
  191. return "@theme/news/embedNewsArticle.html.twig";
  192. }
  193. /**
  194. * @codeCoverageIgnore
  195. */
  196. public function isTraitable(): bool
  197. {
  198. return false;
  199. }
  200. /**
  201. * @codeCoverageIgnore
  202. */
  203. public function getDebugInfo(): array
  204. {
  205. return array ( 188 => 67, 184 => 65, 182 => 64, 178 => 63, 176 => 62, 172 => 61, 168 => 60, 160 => 54, 153 => 50, 149 => 49, 145 => 47, 143 => 46, 139 => 44, 137 => 43, 131 => 40, 125 => 38, 123 => 37, 118 => 36, 108 => 30, 104 => 29, 96 => 25, 85 => 18, 79 => 15, 72 => 11, 66 => 8, 62 => 7, 58 => 6, 54 => 5, 48 => 1,);
  206. }
  207. public function getSourceContext(): Source
  208. {
  209. return new Source("<script type=\"application/ld+json\">
  210. {
  211. \"@context\": \"https://schema.org\",
  212. \"@type\": \"BlogPosting\",
  213. \"headline\": \"{{ news.title }}\",
  214. \"alternativeHeadline\": \"{{ news.subtitle|striptags }}\",
  215. \"datePublished\": \"{{ news.publishDate|date('c') }}\",
  216. \"dateModified\": \"{{ news.updatedAt|date('c') }}\",
  217. \"author\": {
  218. \"@type\": \"Organization\",
  219. \"name\": \"{{ sitename }}\"
  220. },
  221. \"publisher\": {
  222. \"@type\": \"Organization\",
  223. \"name\": \"{{ sitename }}\",
  224. \"logo\": {
  225. \"@type\": \"ImageObject\",
  226. \"url\": \"{{ siteurl }}{{ imageCache(asset('build/images/logo.png'), 'cropResize', 560, 120) }}\",
  227. \"width\": 560,
  228. \"height\": 120
  229. }
  230. },
  231. \"image\": {
  232. \"@type\": \"ImageObject\",
  233. \"url\": \"{{ siteurl }}{{ imageCache('/userfiles/images/news/' ~ news.image, 'zoomCrop', 800, 600) }}\",
  234. \"width\": 800,
  235. \"height\": 600
  236. },
  237. \"description\": \"{{ news.excerpt|raw|striptags }}\",
  238. \"articleBody\": \"{{ news.content|replace({'\\n': ' ', '\\r': ' '})|striptags }}\"
  239. }
  240. </script>
  241. <div class=\"page-hero page-hero--themed page-hero--no-bg page-hero--fade-out news-article__hero\">
  242. <div class=\"container\">
  243. <div class=\"page-hero__content {% if news.image == NULL %}!col-span-12{% endif %}\">
  244. {{- breadcrumbs(news, domCheckIgnore(app.request.pathinfo) ) -}}
  245. <p class=\"text-sm mb-2\">{{ news.publishDate | date('d F Y') }}</p>
  246. <h1 class=\"page-hero__title\">
  247. {{ allowInlineEditor(news, 'title')|raw }}
  248. </h1>
  249. <div class=\"page-hero__subtitle\">
  250. {{ allowInlineEditor(news, 'subtitle')|raw -}}
  251. </div>
  252. </div>
  253. {% if news.image %}
  254. <div class=\"page-hero__image\">
  255. <img
  256. src=\"{{ imageCache('/' ~ news.getFullImagePath, 'zoomCrop', 1700, 700) }}\"
  257. alt=\"{{ news.title }}\"
  258. >
  259. </div>
  260. {% endif %}
  261. </div>
  262. </div>
  263. </div>
  264. <article class=\"news-article\">
  265. <div class=\"container\">
  266. <div class=\"news-article__content cms-area\">
  267. {{ news.isActive and news.publishDate <= date() ? '' : '<h2>PREVIEW - Article not active</h2>' }}
  268. {{ allowInlineEditor(news, 'content')|raw }}
  269. {% if news.ctaText and news.ctaLink %}
  270. <a href=\"{{ news.ctaLink }}\" class=\"button mt-10\">
  271. {{- news.ctaText -}}
  272. </a>
  273. {% endif %}
  274. </div>
  275. </div>
  276. </article>
  277. ", "@theme/news/embedNewsArticle.html.twig", "/var/www/html/t/taurushr/templates/themes/base/news/embedNewsArticle.html.twig");
  278. }
  279. }