var/cache/dev/twig/28/28d3f8f807b4530031701a5ccf75ca8f.php line 195

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. /* areas/header/view.html.twig */
  16. class __TwigTemplate_730079d82e86902680d044764763e99f 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. $this->sandbox = $this->extensions[SandboxExtension::class];
  31. $this->checkSecurity();
  32. }
  33. protected function doDisplay(array $context, array $blocks = []): iterable
  34. {
  35. $macros = $this->macros;
  36. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/header/view.html.twig"));
  38. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/header/view.html.twig"));
  40. // line 3
  41. $context["headlineTag"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "headline", ["store" => [["none", "none"], ["h1", "H1"], ["h2", "H2"], ["h3", "H3"], ["h4", "H4"], ["h5", "H5"], ["h6", "H6"]], "defaultValue" => "", "reload" => true]);
  42. // line 16
  43. yield "
  44. ";
  45. // line 17
  46. if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 17, $this->source); })()), "isEmpty", [], "method", false, false, true, 17)) {
  47. // line 18
  48. yield " ";
  49. CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 18, $this->source); })()), "setDataFromResource", ["none"], "method", false, false, true, 18);
  50. }
  51. // line 20
  52. yield "
  53. ";
  54. // line 21
  55. $context["headline1"] = (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 21, $this->source); })()), "data", [], "any", false, false, true, 21) != "none")) ? ($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 21, $this->source); })()), "data", [], "any", false, false, true, 21), 21, $this->source)) : ("span"));
  56. // line 22
  57. $context["headline2"] = (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 22, $this->source); })()), "data", [], "any", false, false, true, 22) != "none")) ? ((("</" . $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 22, $this->source); })()), "data", [], "any", false, false, true, 22), 22, $this->source)) . ">")) : ("</span>"));
  58. // line 23
  59. yield "
  60. <section class=\"header ";
  61. // line 24
  62. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "MarginBottom"), "getData", [], "method", false, false, true, 24), 24, $this->source), "html", null, true);
  63. yield "\">
  64. ";
  65. // line 25
  66. if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 25, $this->source); })())) {
  67. // line 26
  68. yield " <div class=\"editmode-container\" style=\"display: flex; flex-direction: column; justify-content: center; width: 100%;\">
  69. <div class=\"content flex column center gap-20\">
  70. <div class=\"content-box flex gap-20\">
  71. <div class=\"item\">
  72. <p class=\"edit-p\">Abstand nach unten wählen:</p>
  73. ";
  74. // line 32
  75. yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "MarginBottom", ["reload" => true, "store" => [["regular", "Normal"], ["half", "1/2"], ["small", "1/4"], ["zero", "kein Abstand"]], "defaultValue" => "regular"]);
  76. // line 41
  77. yield "
  78. </div>
  79. <div class=\"item\">
  80. <div class=\"setting select\">
  81. <p class=\"edit-p\">Titel-Typ definieren:</p>
  82. ";
  83. // line 47
  84. yield $this->sandbox->ensureToStringAllowed((isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 47, $this->source); })()), 47, $this->source);
  85. yield "
  86. </div>
  87. </div>
  88. </div>
  89. <div class=\"relation-container\">
  90. ";
  91. // line 53
  92. yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "SwipeSlider", ["title" => "SwipeSlider Objekte ablegen", "types" => ["object"], "subtypes" => ["object" => ["object"]], "classes" => ["SwipeSlider"]]);
  93. // line 60
  94. yield "
  95. </div>
  96. </div>
  97. </div>
  98. ";
  99. } else {
  100. // line 66
  101. yield " <div class=\"swiper header-swiper\">
  102. <div class=\"swiper-wrapper\">
  103. ";
  104. // line 68
  105. $context['_parent'] = $context;
  106. $context['_seq'] = CoreExtension::ensureTraversable($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "SwipeSlider"));
  107. $context['loop'] = [
  108. 'parent' => $context['_parent'],
  109. 'index0' => 0,
  110. 'index' => 1,
  111. 'first' => true,
  112. ];
  113. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  114. $length = count($context['_seq']);
  115. $context['loop']['revindex0'] = $length - 1;
  116. $context['loop']['revindex'] = $length;
  117. $context['loop']['length'] = $length;
  118. $context['loop']['last'] = 1 === $length;
  119. }
  120. foreach ($context['_seq'] as $context["_key"] => $context["slider"]) {
  121. // line 69
  122. yield " <div class=\"swiper-slide flex column\">
  123. ";
  124. // line 70
  125. if (CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "image", [], "any", false, false, true, 70)) {
  126. // line 71
  127. yield " ";
  128. // line 72
  129. yield " ";
  130. // line 73
  131. yield " ";
  132. // line 80
  133. yield " ";
  134. yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "image", [], "any", false, false, true, 80), "thumbnail", ["SwipeSlider"], "method", false, false, true, 80), "html", [["imgAttributes" => ["class" => "desktop", "loading" => "eager"]]], "method", false, false, true, 80), 80, $this->source);
  135. // line 83
  136. yield "
  137. ";
  138. }
  139. // line 85
  140. yield "
  141. <div class=\"hero-hexagon hexagon as-hex\">
  142. ";
  143. // line 87
  144. yield Twig\Extension\CoreExtension::include($this->env, $context, "svg/hexagon.html.twig");
  145. yield "
  146. </div>
  147. <div class=\"headlines\">
  148. ";
  149. // line 92
  150. if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 92, $this->source); })())) {
  151. // line 93
  152. yield " <div class=\"hero-lead\">
  153. ";
  154. // line 94
  155. yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "headline", [], "any", false, false, true, 94), 94, $this->source);
  156. yield "
  157. </div>
  158. ";
  159. } elseif (CoreExtension::getAttribute($this->env, $this->source, // line 96
  160. $context["slider"], "headline", [], "any", false, false, true, 96)) {
  161. // line 97
  162. yield " <";
  163. yield $this->sandbox->ensureToStringAllowed((isset($context["headline1"]) || array_key_exists("headline1", $context) ? $context["headline1"] : (function () { throw new RuntimeError('Variable "headline1" does not exist.', 97, $this->source); })()), 97, $this->source);
  164. yield " class=\"hero-lead\">
  165. ";
  166. // line 98
  167. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "headline", [], "any", false, false, true, 98), 98, $this->source)), "html", null, true);
  168. yield "
  169. ";
  170. // line 99
  171. yield $this->sandbox->ensureToStringAllowed((isset($context["headline2"]) || array_key_exists("headline2", $context) ? $context["headline2"] : (function () { throw new RuntimeError('Variable "headline2" does not exist.', 99, $this->source); })()), 99, $this->source);
  172. yield "
  173. ";
  174. }
  175. // line 101
  176. yield "
  177. ";
  178. // line 103
  179. if (CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "text", [], "any", false, false, true, 103)) {
  180. // line 104
  181. yield " <div class=\"hero-text\">
  182. ";
  183. // line 105
  184. yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "text", [], "any", false, false, true, 105), 105, $this->source);
  185. yield "
  186. </div>
  187. ";
  188. }
  189. // line 108
  190. yield "
  191. </div>
  192. </div>
  193. ";
  194. ++$context['loop']['index0'];
  195. ++$context['loop']['index'];
  196. $context['loop']['first'] = false;
  197. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  198. --$context['loop']['revindex0'];
  199. --$context['loop']['revindex'];
  200. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  201. }
  202. }
  203. $_parent = $context['_parent'];
  204. unset($context['_seq'], $context['_key'], $context['slider'], $context['_parent'], $context['loop']);
  205. $context = array_intersect_key($context, $_parent) + $_parent;
  206. // line 113
  207. yield " </div>
  208. <div class=\"swiper-pagination\"></div>
  209. </div>
  210. ";
  211. }
  212. // line 117
  213. yield "</section>";
  214. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  215. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  216. yield from [];
  217. }
  218. /**
  219. * @codeCoverageIgnore
  220. */
  221. public function getTemplateName(): string
  222. {
  223. return "areas/header/view.html.twig";
  224. }
  225. /**
  226. * @codeCoverageIgnore
  227. */
  228. public function isTraitable(): bool
  229. {
  230. return false;
  231. }
  232. /**
  233. * @codeCoverageIgnore
  234. */
  235. public function getDebugInfo(): array
  236. {
  237. return array ( 230 => 117, 224 => 113, 206 => 108, 200 => 105, 197 => 104, 195 => 103, 191 => 101, 186 => 99, 182 => 98, 177 => 97, 175 => 96, 170 => 94, 167 => 93, 165 => 92, 157 => 87, 153 => 85, 149 => 83, 146 => 80, 144 => 73, 142 => 72, 140 => 71, 138 => 70, 135 => 69, 118 => 68, 114 => 66, 106 => 60, 104 => 53, 95 => 47, 87 => 41, 85 => 32, 77 => 26, 75 => 25, 71 => 24, 68 => 23, 66 => 22, 64 => 21, 61 => 20, 57 => 18, 55 => 17, 52 => 16, 50 => 3,);
  238. }
  239. public function getSourceContext(): Source
  240. {
  241. return new Source("{# default headline #}
  242. {# headline #}
  243. {% set headlineTag = pimcore_select('headline', {
  244. 'store': [
  245. ['none', 'none'],
  246. ['h1', 'H1'],
  247. ['h2', 'H2'],
  248. ['h3', 'H3'],
  249. ['h4', 'H4'],
  250. ['h5', 'H5'],
  251. ['h6', 'H6'],
  252. ],
  253. 'defaultValue': '',
  254. 'reload': true
  255. }) %}
  256. {% if headlineTag.isEmpty() %}
  257. {% do headlineTag.setDataFromResource('none') %}
  258. {% endif %}
  259. {% set headline1 = headlineTag.data != 'none' ? headlineTag.data|raw : 'span'|raw %}
  260. {% set headline2 = headlineTag.data != 'none' ? '</' ~ headlineTag.data|raw ~ '>' : '</span>'|raw %}
  261. <section class=\"header {{ pimcore_select('MarginBottom').getData() }}\">
  262. {% if editmode %}
  263. <div class=\"editmode-container\" style=\"display: flex; flex-direction: column; justify-content: center; width: 100%;\">
  264. <div class=\"content flex column center gap-20\">
  265. <div class=\"content-box flex gap-20\">
  266. <div class=\"item\">
  267. <p class=\"edit-p\">Abstand nach unten wählen:</p>
  268. {{ pimcore_select(\"MarginBottom\", {
  269. \"reload\": true,
  270. \"store\": [
  271. [\"regular\", \"Normal\"],
  272. [\"half\", \"1/2\"],
  273. [\"small\", \"1/4\"],
  274. [\"zero\", \"kein Abstand\"],
  275. ],
  276. \"defaultValue\" : \"regular\"
  277. }) }}
  278. </div>
  279. <div class=\"item\">
  280. <div class=\"setting select\">
  281. <p class=\"edit-p\">Titel-Typ definieren:</p>
  282. {{ headlineTag|raw }}
  283. </div>
  284. </div>
  285. </div>
  286. <div class=\"relation-container\">
  287. {{ pimcore_relations(\"SwipeSlider\", {
  288. \"title\": \"SwipeSlider Objekte ablegen\",
  289. \"types\": [\"object\"],
  290. \"subtypes\": {
  291. \"object\": [\"object\"]
  292. },
  293. \"classes\": [\"SwipeSlider\"]
  294. }) }}
  295. </div>
  296. </div>
  297. </div>
  298. {% else %}
  299. <div class=\"swiper header-swiper\">
  300. <div class=\"swiper-wrapper\">
  301. {% for slider in pimcore_relations(\"SwipeSlider\") %}
  302. <div class=\"swiper-slide flex column\">
  303. {% if slider.image %}
  304. {#<img class=\"desktop\" src=\"{{ slider.image.thumbnail('SwipeSlider') }}\" alt=\"\">#}
  305. {#<img class=\"mobile\" src=\"{{ slider.mobileImage.thumbnail('SwipeSliderMobile') }}\" alt=\"\">#}
  306. {# {% if deviceType == \"phone\" %}
  307. {{ slider.mobileImage.thumbnail('SwipeSliderMobile').html({imgAttributes: {
  308. \"class\": \"mobile\",
  309. 'loading': 'eager',
  310. }}) | raw }}
  311. {% else %}
  312. {% endif %} #}
  313. {{ slider.image.thumbnail('SwipeSlider').html({imgAttributes: {
  314. \"class\": \"desktop\",
  315. 'loading': 'eager',
  316. }}) | raw }}
  317. {% endif %}
  318. <div class=\"hero-hexagon hexagon as-hex\">
  319. {{ include('svg/hexagon.html.twig') }}
  320. </div>
  321. <div class=\"headlines\">
  322. {% if editmode %}
  323. <div class=\"hero-lead\">
  324. {{ slider.headline|raw }}
  325. </div>
  326. {% elseif slider.headline %}
  327. <{{headline1|raw}} class=\"hero-lead\">
  328. {{ slider.headline | striptags }}
  329. {{ headline2|raw }}
  330. {% endif %}
  331. {% if slider.text %}
  332. <div class=\"hero-text\">
  333. {{ slider.text | raw }}
  334. </div>
  335. {% endif %}
  336. </div>
  337. </div>
  338. {% endfor %}
  339. </div>
  340. <div class=\"swiper-pagination\"></div>
  341. </div>
  342. {% endif %}
  343. </section>", "areas/header/view.html.twig", "/home/httpd/vhosts/annavation.a4interactive.ch/httpdocs/dev/templates/areas/header/view.html.twig");
  344. }
  345. public function checkSecurity()
  346. {
  347. static $tags = ["set" => 3, "if" => 17, "do" => 18, "for" => 68];
  348. static $filters = ["raw" => 21, "escape" => 24, "striptags" => 98];
  349. static $functions = ["pimcore_select" => 3, "pimcore_relations" => 53, "include" => 87];
  350. try {
  351. $this->sandbox->checkSecurity(
  352. ['set', 'if', 'do', 'for'],
  353. ['raw', 'escape', 'striptags'],
  354. ['pimcore_select', 'pimcore_relations', 'include'],
  355. $this->source
  356. );
  357. } catch (SecurityError $e) {
  358. $e->setSourceContext($this->source);
  359. if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  360. $e->setTemplateLine($tags[$e->getTagName()]);
  361. } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  362. $e->setTemplateLine($filters[$e->getFilterName()]);
  363. } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  364. $e->setTemplateLine($functions[$e->getFunctionName()]);
  365. }
  366. throw $e;
  367. }
  368. }
  369. }