var/cache/dev/twig/6f/6f641f8fe012e677e41c361feda4f66a.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. /* home/homePage/_header.html.twig */
  16. class __TwigTemplate_5c2d29d97317198d67dedf844f28ef59 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", "home/homePage/_header.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", "home/homePage/_header.html.twig"));
  38. // line 1
  39. $context["image"] = $this->env->getRuntime('PN\ContentBundle\Twig\VarsRuntime')->getDynamicContentAttribute(8, false);
  40. // line 2
  41. if (Twig\Extension\CoreExtension::testEmpty((isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 2, $this->source); })()))) {
  42. // line 3
  43. yield " ";
  44. $context["image"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/assets/img/placeholder-landscape.webp");
  45. }
  46. // line 5
  47. yield "<div class=\"l-featured-section l-featured-section--logo-only ui-featured-section ui-featured-section--logo-only lazyload\"
  48. data-bg=\"";
  49. // line 6
  50. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 6, $this->source); })()), "html", null, true);
  51. yield "\"
  52. data-delay=\"5000\"
  53. >
  54. <div class=\"l-featured-section-content\">
  55. ";
  56. // line 10
  57. yield $this->env->getRuntime('PN\ContentBundle\Twig\VarsRuntime')->editDynamicContentAttribute(8);
  58. yield "
  59. <div class=\"l-container l-container--phone-spacing\">
  60. <div class=\"l-featured-section-logo-container\">
  61. ";
  62. // line 14
  63. yield " <h1 class=\"l-hidden-page-title\">";
  64. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('App\CMSBundle\Twig\SiteSettingVarsRuntime')->getSiteSetting("website-title"), "html", null, true);
  65. yield "</h1>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. ";
  71. // line 21
  72. if ((($tmp = !Twig\Extension\CoreExtension::testEmpty((isset($context["banners"]) || array_key_exists("banners", $context) ? $context["banners"] : (function () { throw new RuntimeError('Variable "banners" does not exist.', 21, $this->source); })()))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  73. // line 22
  74. yield " <div class=\"ui-featured-floating-banners-section l-featured-floating-banners-section\">
  75. <div class=\"l-container l-container--phone-slider-spacing l-container--position-relative\">
  76. <div class=\"swiper l-slider-row\" data-l-slider=\"featured-floating-banners\">
  77. <div class=\"l-flex-row l-flex-row--nowrap l-flex-row--spacing-0 swiper-wrapper\">
  78. ";
  79. // line 26
  80. $context['_parent'] = $context;
  81. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["banners"]) || array_key_exists("banners", $context) ? $context["banners"] : (function () { throw new RuntimeError('Variable "banners" does not exist.', 26, $this->source); })()));
  82. foreach ($context['_seq'] as $context["_key"] => $context["banner"]) {
  83. // line 27
  84. yield " ";
  85. $context["image"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "image", [], "any", false, false, false, 27), "assetPath", [], "any", false, false, false, 27));
  86. // line 28
  87. yield "
  88. ";
  89. // line 30
  90. $context["hasLink"] = false;
  91. // line 31
  92. yield "
  93. ";
  94. // line 32
  95. if (((CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "url", [], "any", false, false, false, 32) != "#") && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "url", [], "any", false, false, false, 32)))) {
  96. // line 33
  97. yield " ";
  98. $context["hasLink"] = true;
  99. // line 34
  100. yield " ";
  101. }
  102. // line 35
  103. yield " <div class=\"l-flex-col-lg-3 swiper-slide\">
  104. <";
  105. // line 36
  106. yield (((($tmp = (isset($context["hasLink"]) || array_key_exists("hasLink", $context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.', 36, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("a") : ("div"));
  107. yield "
  108. class=\"l-featured-floating-banner ui-featured-floating-banner\"
  109. ";
  110. // line 38
  111. if (((isset($context["hasLink"]) || array_key_exists("hasLink", $context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.', 38, $this->source); })()) === true)) {
  112. // line 39
  113. yield " href=\"";
  114. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("banner_redirect", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "id", [], "any", false, false, false, 39)]), "html", null, true);
  115. yield "\"
  116. ";
  117. }
  118. // line 41
  119. yield " ";
  120. yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "openInNewTab", [], "any", false, false, false, 41)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("target=\"_blank\" rel=\"noreferrer\"") : ("rel=\"dofollow\""));
  121. yield "
  122. >
  123. <img
  124. class=\"l-featured-floating-banner-img lazyload\"
  125. width=\"388\"
  126. height=\"304\"
  127. data-expand=\"-20\"
  128. data-delay=\"5000\"
  129. src=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\"
  130. data-src=\"";
  131. // line 50
  132. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('PN\MediaBundle\Twig\VarsRuntime')->setWebpExtension((isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 50, $this->source); })()), null, 304), "html", null, true);
  133. yield "\"
  134. alt=\"";
  135. // line 51
  136. yield (((($tmp = !(null === CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "title", [], "any", false, false, false, 51))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "title", [], "any", false, false, false, 51), "html", null, true)) : ("Ad"));
  137. yield "\"
  138. />
  139. <div class=\"l-featured-floating-banner-caption ui-featured-floating-banner-caption\">
  140. <h2 class=\"ui-featured-floating-banner-caption-title l-featured-floating-banner-caption-title\">";
  141. // line 54
  142. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "title", [], "any", false, false, false, 54), "html", null, true);
  143. yield "</h2>
  144. <p class=\"ui-featured-floating-banner-caption-txt l-featured-floating-banner-caption-txt\">";
  145. // line 55
  146. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "text", [], "any", false, false, false, 55), "html", null, true);
  147. yield "</p>
  148. </div>
  149. ";
  150. // line 57
  151. yield (((($tmp = (isset($context["hasLink"]) || array_key_exists("hasLink", $context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.', 57, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("</a>") : ("</div>"));
  152. yield "
  153. </div>
  154. ";
  155. }
  156. $_parent = $context['_parent'];
  157. unset($context['_seq'], $context['_key'], $context['banner'], $context['_parent']);
  158. $context = array_intersect_key($context, $_parent) + $_parent;
  159. // line 60
  160. yield " </div>
  161. </div>
  162. </div>
  163. <div class=\"swiper-pagination\" data-l-slider-pagination=\"featured-floating-banners\"></div>
  164. <div class=\"swiper-button-prev\" data-l-slider-navigation-prev=\"featured-floating-banners\"></div>
  165. <div class=\"swiper-button-next\" data-l-slider-navigation-next=\"featured-floating-banners\"></div>
  166. </div>
  167. ";
  168. }
  169. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  170. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  171. yield from [];
  172. }
  173. /**
  174. * @codeCoverageIgnore
  175. */
  176. public function getTemplateName(): string
  177. {
  178. return "home/homePage/_header.html.twig";
  179. }
  180. /**
  181. * @codeCoverageIgnore
  182. */
  183. public function isTraitable(): bool
  184. {
  185. return false;
  186. }
  187. /**
  188. * @codeCoverageIgnore
  189. */
  190. public function getDebugInfo(): array
  191. {
  192. return array ( 172 => 60, 163 => 57, 158 => 55, 154 => 54, 148 => 51, 144 => 50, 131 => 41, 125 => 39, 123 => 38, 118 => 36, 115 => 35, 112 => 34, 109 => 33, 107 => 32, 104 => 31, 102 => 30, 98 => 28, 95 => 27, 91 => 26, 85 => 22, 83 => 21, 72 => 14, 66 => 10, 59 => 6, 56 => 5, 52 => 3, 50 => 2, 48 => 1,);
  193. }
  194. public function getSourceContext(): Source
  195. {
  196. return new Source("{% set image = getDCA(8, false) %}
  197. {% if image is empty %}
  198. {% set image = asset('/assets/img/placeholder-landscape.webp') %}
  199. {% endif %}
  200. <div class=\"l-featured-section l-featured-section--logo-only ui-featured-section ui-featured-section--logo-only lazyload\"
  201. data-bg=\"{{ image }}\"
  202. data-delay=\"5000\"
  203. >
  204. <div class=\"l-featured-section-content\">
  205. {{ editDCA(8) }}
  206. <div class=\"l-container l-container--phone-spacing\">
  207. <div class=\"l-featured-section-logo-container\">
  208. {# {% include \"fe/icons/logo.svg\" %}#}
  209. <h1 class=\"l-hidden-page-title\">{{ getSiteSetting(\"website-title\") }}</h1>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. {% if banners is not empty %}
  215. <div class=\"ui-featured-floating-banners-section l-featured-floating-banners-section\">
  216. <div class=\"l-container l-container--phone-slider-spacing l-container--position-relative\">
  217. <div class=\"swiper l-slider-row\" data-l-slider=\"featured-floating-banners\">
  218. <div class=\"l-flex-row l-flex-row--nowrap l-flex-row--spacing-0 swiper-wrapper\">
  219. {% for banner in banners %}
  220. {% set image = asset(banner.image.assetPath) %}
  221. {% set hasLink = false %}
  222. {% if banner.url != '#' and banner.url is not empty %}
  223. {% set hasLink = true %}
  224. {% endif %}
  225. <div class=\"l-flex-col-lg-3 swiper-slide\">
  226. <{{ hasLink ? \"a\":\"div\" }}
  227. class=\"l-featured-floating-banner ui-featured-floating-banner\"
  228. {% if hasLink is same as (true) %}
  229. href=\"{{ path('banner_redirect', {'id':banner.id}) }}\"
  230. {% endif %}
  231. {{ banner.openInNewTab ? 'target=\"_blank\" rel=\"noreferrer\"' : 'rel=\"dofollow\"' }}
  232. >
  233. <img
  234. class=\"l-featured-floating-banner-img lazyload\"
  235. width=\"388\"
  236. height=\"304\"
  237. data-expand=\"-20\"
  238. data-delay=\"5000\"
  239. src=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\"
  240. data-src=\"{{ image|webp(null, 304) }}\"
  241. alt=\"{{ banner.title is not null ? banner.title : \"Ad\" }}\"
  242. />
  243. <div class=\"l-featured-floating-banner-caption ui-featured-floating-banner-caption\">
  244. <h2 class=\"ui-featured-floating-banner-caption-title l-featured-floating-banner-caption-title\">{{ banner.title }}</h2>
  245. <p class=\"ui-featured-floating-banner-caption-txt l-featured-floating-banner-caption-txt\">{{ banner.text }}</p>
  246. </div>
  247. {{ hasLink ? \"</a>\" : \"</div>\" }}
  248. </div>
  249. {% endfor %}
  250. </div>
  251. </div>
  252. </div>
  253. <div class=\"swiper-pagination\" data-l-slider-pagination=\"featured-floating-banners\"></div>
  254. <div class=\"swiper-button-prev\" data-l-slider-navigation-prev=\"featured-floating-banners\"></div>
  255. <div class=\"swiper-button-next\" data-l-slider-navigation-next=\"featured-floating-banners\"></div>
  256. </div>
  257. {% endif %}
  258. ", "home/homePage/_header.html.twig", "/var/www/esorus-shop/templates/home/homePage/_header.html.twig");
  259. }
  260. }