var/cache/dev/twig/71/71ec3c217beb17378ce374212fcac73f.php line 217

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/sectors/list_full.html.twig */
  16. class __TwigTemplate_4e6a6b31d02150abee83f81a134e5606 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/sectors/list_full.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/sectors/list_full.html.twig"));
  38. // line 1
  39. yield "<script type=\"application/ld+json\">
  40. {
  41. \"@context\": \"https://schema.org\",
  42. \"@type\": \"LocalBusiness\",
  43. \"name\": \"";
  44. // line 5
  45. 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.', 5, $this->source); })()), "html", null, true);
  46. yield "\",
  47. \"url\": \"";
  48. // line 6
  49. 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.', 6, $this->source); })()), "html", null, true);
  50. yield "\",
  51. \"areaServed\": [
  52. {
  53. \"@type\": \"Place\",
  54. \"name\": \"London\"
  55. },
  56. {
  57. \"@type\": \"Place\",
  58. \"name\": \"Esssex\"
  59. },
  60. {
  61. \"@type\": \"Place\",
  62. \"name\": \"Kent\"
  63. },
  64. {
  65. \"@type\": \"Place\",
  66. \"name\": \"Cambridge\"
  67. },
  68. {
  69. \"@type\": \"Place\",
  70. \"name\": \"Oxford\"
  71. }
  72. ],
  73. \"hasOfferCatalog\": {
  74. \"@type\": \"OfferCatalog\",
  75. \"name\": \"Our Scaffolding Services\",
  76. \"itemListElement\": [
  77. ";
  78. // line 33
  79. $context['_parent'] = $context;
  80. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["sectorChunks"]) || array_key_exists("sectorChunks", $context) ? $context["sectorChunks"] : (function () { throw new RuntimeError('Variable "sectorChunks" does not exist.', 33, $this->source); })()));
  81. $context['loop'] = [
  82. 'parent' => $context['_parent'],
  83. 'index0' => 0,
  84. 'index' => 1,
  85. 'first' => true,
  86. ];
  87. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  88. $length = count($context['_seq']);
  89. $context['loop']['revindex0'] = $length - 1;
  90. $context['loop']['revindex'] = $length;
  91. $context['loop']['length'] = $length;
  92. $context['loop']['last'] = 1 === $length;
  93. }
  94. foreach ($context['_seq'] as $context["_key"] => $context["sectors"]) {
  95. // line 34
  96. yield " ";
  97. $context['_parent'] = $context;
  98. $context['_seq'] = CoreExtension::ensureTraversable($context["sectors"]);
  99. $context['loop'] = [
  100. 'parent' => $context['_parent'],
  101. 'index0' => 0,
  102. 'index' => 1,
  103. 'first' => true,
  104. ];
  105. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  106. $length = count($context['_seq']);
  107. $context['loop']['revindex0'] = $length - 1;
  108. $context['loop']['revindex'] = $length;
  109. $context['loop']['length'] = $length;
  110. $context['loop']['last'] = 1 === $length;
  111. }
  112. foreach ($context['_seq'] as $context["_key"] => $context["sector"]) {
  113. // line 35
  114. yield " {
  115. \"@type\": \"Offer\",
  116. \"itemOffered\": {
  117. \"@type\": \"Service\",
  118. \"name\": \"";
  119. // line 39
  120. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "title", [], "any", false, false, false, 39), "html", null, true);
  121. yield "\",
  122. \"description\": \"";
  123. // line 40
  124. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "kicker", [], "any", false, false, false, 40)), "html", null, true);
  125. yield "\"
  126. }
  127. }";
  128. // line 42
  129. if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 42) == false)) {
  130. yield ",";
  131. }
  132. // line 43
  133. yield " ";
  134. ++$context['loop']['index0'];
  135. ++$context['loop']['index'];
  136. $context['loop']['first'] = false;
  137. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  138. --$context['loop']['revindex0'];
  139. --$context['loop']['revindex'];
  140. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  141. }
  142. }
  143. $_parent = $context['_parent'];
  144. unset($context['_seq'], $context['_key'], $context['sector'], $context['_parent'], $context['loop']);
  145. $context = array_intersect_key($context, $_parent) + $_parent;
  146. // line 44
  147. yield " ";
  148. if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 44) == false)) {
  149. yield ",";
  150. }
  151. // line 45
  152. yield " ";
  153. ++$context['loop']['index0'];
  154. ++$context['loop']['index'];
  155. $context['loop']['first'] = false;
  156. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  157. --$context['loop']['revindex0'];
  158. --$context['loop']['revindex'];
  159. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  160. }
  161. }
  162. $_parent = $context['_parent'];
  163. unset($context['_seq'], $context['_key'], $context['sectors'], $context['_parent'], $context['loop']);
  164. $context = array_intersect_key($context, $_parent) + $_parent;
  165. // line 46
  166. yield " ]
  167. }
  168. }
  169. </script>
  170. <div class=\"container mb-4\">
  171. ";
  172. // line 53
  173. $context['_parent'] = $context;
  174. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["sectorChunks"]) || array_key_exists("sectorChunks", $context) ? $context["sectorChunks"] : (function () { throw new RuntimeError('Variable "sectorChunks" does not exist.', 53, $this->source); })()));
  175. foreach ($context['_seq'] as $context["_key"] => $context["sectors"]) {
  176. // line 54
  177. yield " <div class=\"sector-grid mb-8\">
  178. ";
  179. // line 55
  180. $context['_parent'] = $context;
  181. $context['_seq'] = CoreExtension::ensureTraversable($context["sectors"]);
  182. $context['loop'] = [
  183. 'parent' => $context['_parent'],
  184. 'index0' => 0,
  185. 'index' => 1,
  186. 'first' => true,
  187. ];
  188. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  189. $length = count($context['_seq']);
  190. $context['loop']['revindex0'] = $length - 1;
  191. $context['loop']['revindex'] = $length;
  192. $context['loop']['length'] = $length;
  193. $context['loop']['last'] = 1 === $length;
  194. }
  195. foreach ($context['_seq'] as $context["_key"] => $context["sector"]) {
  196. // line 56
  197. yield " <a class=\"sector-grid--item ";
  198. if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 56) || (0 == CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 56) % 3))) {
  199. yield "before";
  200. } elseif ((0 == CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 56) % 3)) {
  201. yield "after";
  202. } else {
  203. yield "center";
  204. }
  205. yield "\" style=\"background-image:url('";
  206. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/" . CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "getFullImagePath", [], "any", false, false, false, 56)), "zoomCrop", 1040, 640), "html", null, true);
  207. yield "');\" href=\"";
  208. 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.', 56, $this->source); })()), "request", [], "any", false, false, false, 56), CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "linkedPageId", [], "any", false, false, false, 56), ["sector_slug" => CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "slug", [], "any", false, false, false, 56)]), "html", null, true);
  209. yield "\">
  210. <img class=\"max-w-full h-auto md:hidden\" src=\"";
  211. // line 57
  212. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/" . CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "getFullImagePath", [], "any", false, false, false, 57)), "zoomCrop", 1040, 640), "html", null, true);
  213. yield "\" alt=\"";
  214. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "title", [], "any", false, false, false, 57), "html", null, true);
  215. yield "\">
  216. <div class=\"sector-grid--info text-sm md:text-base\">
  217. ";
  218. // line 59
  219. yield CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "icon", [], "any", false, false, false, 59);
  220. yield "
  221. <h3>";
  222. // line 60
  223. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "title", [], "any", false, false, false, 60), "html", null, true);
  224. yield "</h3>
  225. ";
  226. // line 61
  227. yield CoreExtension::getAttribute($this->env, $this->source, $context["sector"], "kicker", [], "any", false, false, false, 61);
  228. yield "
  229. <span>Read More</span>
  230. </div>
  231. </a>
  232. ";
  233. ++$context['loop']['index0'];
  234. ++$context['loop']['index'];
  235. $context['loop']['first'] = false;
  236. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  237. --$context['loop']['revindex0'];
  238. --$context['loop']['revindex'];
  239. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  240. }
  241. }
  242. $_parent = $context['_parent'];
  243. unset($context['_seq'], $context['_key'], $context['sector'], $context['_parent'], $context['loop']);
  244. $context = array_intersect_key($context, $_parent) + $_parent;
  245. // line 66
  246. yield " </div>
  247. ";
  248. }
  249. $_parent = $context['_parent'];
  250. unset($context['_seq'], $context['_key'], $context['sectors'], $context['_parent']);
  251. $context = array_intersect_key($context, $_parent) + $_parent;
  252. // line 68
  253. yield "</div>
  254. ";
  255. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  256. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  257. yield from [];
  258. }
  259. /**
  260. * @codeCoverageIgnore
  261. */
  262. public function getTemplateName(): string
  263. {
  264. return "themes/theme/sectors/list_full.html.twig";
  265. }
  266. /**
  267. * @codeCoverageIgnore
  268. */
  269. public function isTraitable(): bool
  270. {
  271. return false;
  272. }
  273. /**
  274. * @codeCoverageIgnore
  275. */
  276. public function getDebugInfo(): array
  277. {
  278. return array ( 264 => 68, 257 => 66, 238 => 61, 234 => 60, 230 => 59, 223 => 57, 208 => 56, 191 => 55, 188 => 54, 184 => 53, 175 => 46, 161 => 45, 156 => 44, 142 => 43, 138 => 42, 133 => 40, 129 => 39, 123 => 35, 105 => 34, 88 => 33, 58 => 6, 54 => 5, 48 => 1,);
  279. }
  280. public function getSourceContext(): Source
  281. {
  282. return new Source("<script type=\"application/ld+json\">
  283. {
  284. \"@context\": \"https://schema.org\",
  285. \"@type\": \"LocalBusiness\",
  286. \"name\": \"{{ sitename }}\",
  287. \"url\": \"{{ siteurl }}\",
  288. \"areaServed\": [
  289. {
  290. \"@type\": \"Place\",
  291. \"name\": \"London\"
  292. },
  293. {
  294. \"@type\": \"Place\",
  295. \"name\": \"Esssex\"
  296. },
  297. {
  298. \"@type\": \"Place\",
  299. \"name\": \"Kent\"
  300. },
  301. {
  302. \"@type\": \"Place\",
  303. \"name\": \"Cambridge\"
  304. },
  305. {
  306. \"@type\": \"Place\",
  307. \"name\": \"Oxford\"
  308. }
  309. ],
  310. \"hasOfferCatalog\": {
  311. \"@type\": \"OfferCatalog\",
  312. \"name\": \"Our Scaffolding Services\",
  313. \"itemListElement\": [
  314. {% for sectors in sectorChunks %}
  315. {% for sector in sectors %}
  316. {
  317. \"@type\": \"Offer\",
  318. \"itemOffered\": {
  319. \"@type\": \"Service\",
  320. \"name\": \"{{ sector.title }}\",
  321. \"description\": \"{{ sector.kicker|raw|striptags }}\"
  322. }
  323. }{% if loop.last == false %},{% endif %}
  324. {% endfor %}
  325. {% if loop.last == false %},{% endif %}
  326. {% endfor %}
  327. ]
  328. }
  329. }
  330. </script>
  331. <div class=\"container mb-4\">
  332. {% for sectors in sectorChunks %}
  333. <div class=\"sector-grid mb-8\">
  334. {% for sector in sectors %}
  335. <a class=\"sector-grid--item {% if loop.first or loop.index0 is divisible by(3) %}before{% elseif loop.index is divisible by(3) %}after{% else %}center{% endif %}\" style=\"background-image:url('{{ imageCache('/'~ sector.getFullImagePath, 'zoomCrop', 1040, 640) }}');\" href=\"{{ generatePath(app.request, sector.linkedPageId, {sector_slug: sector.slug}) }}\">
  336. <img class=\"max-w-full h-auto md:hidden\" src=\"{{ imageCache('/'~ sector.getFullImagePath, 'zoomCrop', 1040, 640) }}\" alt=\"{{ sector.title }}\">
  337. <div class=\"sector-grid--info text-sm md:text-base\">
  338. {{ sector.icon|raw }}
  339. <h3>{{ sector.title }}</h3>
  340. {{ sector.kicker|raw }}
  341. <span>Read More</span>
  342. </div>
  343. </a>
  344. {% endfor %}
  345. </div>
  346. {% endfor %}
  347. </div>
  348. ", "themes/theme/sectors/list_full.html.twig", "/var/www/html/k/kasscaffolding/templates/themes/theme/sectors/list_full.html.twig");
  349. }
  350. }