var/cache/dev/twig/a5/a5e86777ceba716202ec4e55e5712c42.php line 40

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/image/view.html.twig */
  16. class __TwigTemplate_2efea49029593d0450e2f1c8f6a64424 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/image/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/image/view.html.twig"));
  40. // line 1
  41. $context["align"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "align");
  42. // line 2
  43. $context["thumbnaileName"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "thumbnaileName");
  44. // line 3
  45. $context["caption"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "caption");
  46. // line 4
  47. $context["title"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "title");
  48. // line 5
  49. $context["lightbox"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "lightbox");
  50. // line 6
  51. $context["containerClass"] = "container";
  52. // line 7
  53. $context["altText"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "altText", ["required" => true]);
  54. // line 8
  55. yield "
  56. ";
  57. // line 9
  58. if ((array_key_exists("container", $context) && ((isset($context["container"]) || array_key_exists("container", $context) ? $context["container"] : (function () { throw new RuntimeError('Variable "container" does not exist.', 9, $this->source); })()) == false))) {
  59. // line 10
  60. yield " ";
  61. $context["containerClass"] = "";
  62. }
  63. // line 12
  64. yield "
  65. ";
  66. // line 13
  67. $context["contentImage"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "contentImage", ["thumbnail" => $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["thumbnaileName"]) || array_key_exists("thumbnaileName", $context) ? $context["thumbnaileName"] : (function () { throw new RuntimeError('Variable "thumbnaileName" does not exist.', 13, $this->source); })()), "text", [], "any", false, false, true, 13), 13, $this->source), "width" => "auto", "hidetext" => true]);
  68. // line 14
  69. yield "
  70. ";
  71. // line 15
  72. if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 15, $this->source); })())) {
  73. // line 16
  74. yield " <div class=\"";
  75. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["align"]) || array_key_exists("align", $context) ? $context["align"] : (function () { throw new RuntimeError('Variable "align" does not exist.', 16, $this->source); })()), "getData", [], "method", false, false, true, 16), 16, $this->source), "html", null, true);
  76. yield " ";
  77. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["containerClass"]) || array_key_exists("containerClass", $context) ? $context["containerClass"] : (function () { throw new RuntimeError('Variable "containerClass" does not exist.', 16, $this->source); })()), 16, $this->source), "html", null, true);
  78. yield "\">
  79. <div class=\"my-2\">
  80. <label>Alttext*:</label>
  81. <div class=\"border\">
  82. ";
  83. // line 20
  84. yield $this->sandbox->ensureToStringAllowed((isset($context["altText"]) || array_key_exists("altText", $context) ? $context["altText"] : (function () { throw new RuntimeError('Variable "altText" does not exist.', 20, $this->source); })()), 20, $this->source);
  85. yield "
  86. </div>
  87. </div>
  88. <div class=\"my2\">
  89. <label>Link (optinal)</label>
  90. <div>
  91. ";
  92. // line 26
  93. yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", "imageLink");
  94. yield "
  95. </div>
  96. </div>
  97. ";
  98. // line 30
  99. yield $this->sandbox->ensureToStringAllowed((isset($context["contentImage"]) || array_key_exists("contentImage", $context) ? $context["contentImage"] : (function () { throw new RuntimeError('Variable "contentImage" does not exist.', 30, $this->source); })()), 30, $this->source);
  100. yield "
  101. ";
  102. // line 31
  103. if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["caption"]) || array_key_exists("caption", $context) ? $context["caption"] : (function () { throw new RuntimeError('Variable "caption" does not exist.', 31, $this->source); })()), "getData", [], "method", false, false, true, 31) != "")) {
  104. // line 32
  105. yield " <figcaption>";
  106. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["caption"]) || array_key_exists("caption", $context) ? $context["caption"] : (function () { throw new RuntimeError('Variable "caption" does not exist.', 32, $this->source); })()), "getData", [], "method", false, false, true, 32), 32, $this->source), "html", null, true);
  107. yield "</figcaption>
  108. ";
  109. }
  110. // line 34
  111. yield " </div>
  112. ";
  113. } else {
  114. // line 36
  115. yield " ";
  116. yield from $this->loadTemplate("content/image/view.html.twig", "areas/image/view.html.twig", 36)->unwrap()->yield($context);
  117. }
  118. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  119. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  120. yield from [];
  121. }
  122. /**
  123. * @codeCoverageIgnore
  124. */
  125. public function getTemplateName(): string
  126. {
  127. return "areas/image/view.html.twig";
  128. }
  129. /**
  130. * @codeCoverageIgnore
  131. */
  132. public function isTraitable(): bool
  133. {
  134. return false;
  135. }
  136. /**
  137. * @codeCoverageIgnore
  138. */
  139. public function getDebugInfo(): array
  140. {
  141. return array ( 125 => 36, 121 => 34, 115 => 32, 113 => 31, 109 => 30, 102 => 26, 93 => 20, 83 => 16, 81 => 15, 78 => 14, 76 => 13, 73 => 12, 69 => 10, 67 => 9, 64 => 8, 62 => 7, 60 => 6, 58 => 5, 56 => 4, 54 => 3, 52 => 2, 50 => 1,);
  142. }
  143. public function getSourceContext(): Source
  144. {
  145. return new Source("{% set align = pimcore_select(\"align\") %}
  146. {% set thumbnaileName = pimcore_select(\"thumbnaileName\") %}
  147. {% set caption = pimcore_input(\"caption\") %}
  148. {% set title = pimcore_input(\"title\") %}
  149. {% set lightbox = pimcore_checkbox(\"lightbox\") %}
  150. {% set containerClass = 'container' %}
  151. {% set altText = pimcore_input(\"altText\", { 'required' : true }) %}
  152. {% if container is defined and container == false %}
  153. {% set containerClass = '' %}
  154. {% endif %}
  155. {% set contentImage = pimcore_image(\"contentImage\", { \"thumbnail\": thumbnaileName.text, 'width' : 'auto', 'hidetext' : true }) %}
  156. {% if editmode %}
  157. <div class=\"{{ align.getData() }} {{ containerClass }}\">
  158. <div class=\"my-2\">
  159. <label>Alttext*:</label>
  160. <div class=\"border\">
  161. {{ altText | raw }}
  162. </div>
  163. </div>
  164. <div class=\"my2\">
  165. <label>Link (optinal)</label>
  166. <div>
  167. {{ pimcore_link('imageLink') }}
  168. </div>
  169. </div>
  170. {{ contentImage|raw }}
  171. {% if caption.getData() != '' %}
  172. <figcaption>{{ caption.getData() }}</figcaption>
  173. {% endif %}
  174. </div>
  175. {% else %}
  176. {% include \"content/image/view.html.twig\" %}
  177. {% endif %}
  178. ", "areas/image/view.html.twig", "/var/www/vhosts/mensa-fasching.de/uat/releases/20250218080531/templates/areas/image/view.html.twig");
  179. }
  180. public function checkSecurity()
  181. {
  182. static $tags = ["set" => 1, "if" => 9, "include" => 36];
  183. static $filters = ["escape" => 16, "raw" => 20];
  184. static $functions = ["pimcore_select" => 1, "pimcore_input" => 3, "pimcore_checkbox" => 5, "pimcore_image" => 13, "pimcore_link" => 26];
  185. try {
  186. $this->sandbox->checkSecurity(
  187. ['set', 'if', 'include'],
  188. ['escape', 'raw'],
  189. ['pimcore_select', 'pimcore_input', 'pimcore_checkbox', 'pimcore_image', 'pimcore_link'],
  190. $this->source
  191. );
  192. } catch (SecurityError $e) {
  193. $e->setSourceContext($this->source);
  194. if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  195. $e->setTemplateLine($tags[$e->getTagName()]);
  196. } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  197. $e->setTemplateLine($filters[$e->getFilterName()]);
  198. } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  199. $e->setTemplateLine($functions[$e->getFunctionName()]);
  200. }
  201. throw $e;
  202. }
  203. }
  204. }