var/cache/dev/twig/2d/2df407d23443b785150ff597b0e43229.php line 137

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* areas/image/view.html.twig */
  14. class __TwigTemplate_a2de8c5fd7a3226ce07ca50324874977 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/image/view.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/image/view.html.twig"));
  35.         // line 6
  36.         echo "
  37. ";
  38.         // line 7
  39.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'7$this->source); })())) {
  40.             // line 8
  41.             echo "<div class=\"admin-container admin-container--limited-width\">
  42. \t<div class=\"admin-container__section\">
  43. \t\t<span class=\"admin-container__title\">";
  44.             // line 10
  45.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("brick.image.title", [], "admin"), "html"nulltrue);
  46.             echo "</span>
  47. \t</div>
  48. \t<div class=\"admin-container__configurations\">
  49. \t\t<div class=\"admin-config-item\">
  50. \t\t\t<span class=\"admin-config-item__label\">";
  51.             // line 14
  52.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("brick.image.option.link", [], "admin"), "html"nulltrue);
  53.             echo ":</span>
  54. \t\t\t";
  55.             // line 15
  56.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"link""link", ["noText" => true]);
  57.             // line 17
  58.             echo "
  59. \t\t\t<br>
  60. \t\t\t<span class=\"admin-config-item__label\">";
  61.             // line 21
  62.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("brick.image.option.border", [], "admin"), "html"nulltrue);
  63.             echo ":</span>
  64. \t\t\t";
  65.             // line 22
  66.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"checkbox""border", ["reload" => true]);
  67.             // line 24
  68.             echo "
  69. \t\t</div>
  70. \t</div>
  71. </div>
  72. ";
  73.         }
  74.         // line 29
  75.         echo "
  76. ";
  77.         // line 30
  78.         $context["sectionIndex"] = ((array_key_exists("sectionIndex"$context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["sectionIndex"]) || array_key_exists("sectionIndex"$context) ? $context["sectionIndex"] : (function () { throw new RuntimeError('Variable "sectionIndex" does not exist.'30$this->source); })()), 30$this->source), 0)) : (0));
  79.         // line 31
  80.         $context["gridIndex"] = ((array_key_exists("gridIndex"$context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["gridIndex"]) || array_key_exists("gridIndex"$context) ? $context["gridIndex"] : (function () { throw new RuntimeError('Variable "gridIndex" does not exist.'31$this->source); })()), 31$this->source), 0)) : (0));
  81.         // line 32
  82.         echo "
  83. <!-- thumb: ";
  84.         // line 33
  85.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["thumbnail"]) || array_key_exists("thumbnail"$context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.'33$this->source); })()), 33$this->source), "html"nulltrue);
  86.         echo " | section-idx: ";
  87.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["sectionIndex"]) || array_key_exists("sectionIndex"$context) ? $context["sectionIndex"] : (function () { throw new RuntimeError('Variable "sectionIndex" does not exist.'33$this->source); })()), 33$this->source), "html"nulltrue);
  88.         echo " | grid-idx: ";
  89.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["gridIndex"]) || array_key_exists("gridIndex"$context) ? $context["gridIndex"] : (function () { throw new RuntimeError('Variable "gridIndex" does not exist.'33$this->source); })()), 33$this->source), "html"nulltrue);
  90.         echo " -->
  91. <div class=\"area image ";
  92.         // line 35
  93.         echo twig_escape_filter($this->envtwig_join_filter($this->sandbox->ensureToStringAllowed((isset($context["cssClasses"]) || array_key_exists("cssClasses"$context) ? $context["cssClasses"] : (function () { throw new RuntimeError('Variable "cssClasses" does not exist.'35$this->source); })()), 35$this->source), " "), "html"nulltrue);
  94.         echo "\" style=\"";
  95.         echo twig_escape_filter($this->envtwig_join_filter($this->sandbox->ensureToStringAllowed((isset($context["cssStyles"]) || array_key_exists("cssStyles"$context) ? $context["cssStyles"] : (function () { throw new RuntimeError('Variable "cssStyles" does not exist.'35$this->source); })()), 35$this->source), " "), "html"nulltrue);
  96.         echo "\">
  97. \t";
  98.         // line 37
  99.         echo "\t";
  100.         $context["preventLoadingLazy"] = ( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'37$this->source); })()) && (((isset($context["sectionIndex"]) || array_key_exists("sectionIndex"$context) ? $context["sectionIndex"] : (function () { throw new RuntimeError('Variable "sectionIndex" does not exist.'37$this->source); })()) == 0) && ((isset($context["gridIndex"]) || array_key_exists("gridIndex"$context) ? $context["gridIndex"] : (function () { throw new RuntimeError('Variable "gridIndex" does not exist.'37$this->source); })()) <= 1)));
  101.         // line 38
  102.         echo "
  103. \t";
  104.         // line 40
  105.         $context["content"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image", ["class" => "image__image""lowQualityPlaceholder" => false"thumbnail" => ((        // line 43
  106. array_key_exists("thumbnail"$context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["thumbnail"]) || array_key_exists("thumbnail"$context) ? $context["thumbnail"] : (function () { throw new RuntimeError('Variable "thumbnail" does not exist.'43$this->source); })()), 43$this->source), false)) : (false)), "imgAttributes" => ["loading" => ((        // line 45
  107. (isset($context["preventLoadingLazy"]) || array_key_exists("preventLoadingLazy"$context) ? $context["preventLoadingLazy"] : (function () { throw new RuntimeError('Variable "preventLoadingLazy" does not exist.'45$this->source); })())) ? ("eager") : ("lazy")), "decoding" => ((        // line 46
  108. (isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'46$this->source); })())) ? ("sync") : ("async"))]]);
  109.         // line 50
  110.         echo "
  111. \t";
  112.         // line 52
  113.         if (( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'52$this->source); })()) && (isset($context["hasLink"]) || array_key_exists("hasLink"$context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.'52$this->source); })()))) {
  114.             // line 53
  115.             echo "\t\t";
  116.             // line 54
  117.             $this->loadTemplate("includes/partials/link-wrapper.html.twig""areas/image/view.html.twig"54)->display(twig_array_merge($context, ["content" =>             // line 55
  118. (isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'55$this->source); })()), "href" => twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"link""link"), "getHref", [], "method"falsefalsetrue56), "title" => twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"link""link"), "getTitle", [], "method"falsefalsetrue57)]));
  119.             // line 60
  120.             echo "\t";
  121.         } else {
  122.             // line 61
  123.             echo "\t\t";
  124.             echo $this->sandbox->ensureToStringAllowed((isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'61$this->source); })()), 61$this->source);
  125.             echo "
  126. \t";
  127.         }
  128.         // line 63
  129.         echo "</div>";
  130.         
  131.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  132.         
  133.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  134.     }
  135.     public function getTemplateName()
  136.     {
  137.         return "areas/image/view.html.twig";
  138.     }
  139.     public function isTraitable()
  140.     {
  141.         return false;
  142.     }
  143.     public function getDebugInfo()
  144.     {
  145.         return array (  142 => 63,  136 => 61,  133 => 60,  131 => 55,  130 => 54,  128 => 53,  126 => 52,  122 => 50,  120 => 46,  119 => 45,  118 => 43,  117 => 40,  114 => 38,  111 => 37,  105 => 35,  96 => 33,  93 => 32,  91 => 31,  89 => 30,  86 => 29,  79 => 24,  77 => 22,  73 => 21,  67 => 17,  65 => 15,  61 => 14,  54 => 10,  50 => 8,  48 => 7,  45 => 6,);
  146.     }
  147.     public function getSourceContext()
  148.     {
  149.         return new Source("{#
  150. project: Pimcore
  151. User: EBiermann
  152. Year: 2022
  153. #}
  154. {% if editmode %}
  155. <div class=\"admin-container admin-container--limited-width\">
  156. \t<div class=\"admin-container__section\">
  157. \t\t<span class=\"admin-container__title\">{{ 'brick.image.title'|trans({}, 'admin') }}</span>
  158. \t</div>
  159. \t<div class=\"admin-container__configurations\">
  160. \t\t<div class=\"admin-config-item\">
  161. \t\t\t<span class=\"admin-config-item__label\">{{ 'brick.image.option.link'|trans({}, 'admin') }}:</span>
  162. \t\t\t{{
  163. \t\t\t\tpimcore_link('link', { 'noText': true })
  164. \t\t\t}}
  165. \t\t\t<br>
  166. \t\t\t<span class=\"admin-config-item__label\">{{ 'brick.image.option.border'|trans({}, 'admin') }}:</span>
  167. \t\t\t{{
  168. \t\t\t\tpimcore_checkbox('border', { 'reload': true })
  169. \t\t\t}}
  170. \t\t</div>
  171. \t</div>
  172. </div>
  173. {% endif %}
  174. {% set sectionIndex = sectionIndex|default(0) %}
  175. {% set gridIndex = gridIndex|default(0) %}
  176. <!-- thumb: {{ thumbnail }} | section-idx: {{ sectionIndex }} | grid-idx: {{ gridIndex }} -->
  177. <div class=\"area image {{ cssClasses|join(' ') }}\" style=\"{{ cssStyles|join(' ') }}\">
  178. \t{# LCP, should not be lazy loaded (images on init page load abvoe the fold) #}
  179. \t{% set preventLoadingLazy = not editmode and (sectionIndex == 0 and gridIndex <= 1) %}
  180. \t{%
  181. \t\tset content = pimcore_image('image', {
  182. \t\t\t'class': 'image__image',
  183. \t\t\t'lowQualityPlaceholder': false,
  184. \t\t\t'thumbnail': thumbnail|default(false),
  185. \t\t\t'imgAttributes': {
  186. \t\t\t\t'loading': preventLoadingLazy ? 'eager' : 'lazy',
  187. \t\t\t\t'decoding': editmode ? 'sync' : 'async'
  188. \t\t\t}
  189. \t\t})
  190. \t%}
  191. \t{% if not editmode and hasLink %}
  192. \t\t{%
  193. \t\t\tinclude 'includes/partials/link-wrapper.html.twig' with {
  194. \t\t\t\tcontent: content,
  195. \t\t\t\thref: pimcore_link('link').getHref(),
  196. \t\t\t\ttitle: pimcore_link('link').getTitle()
  197. \t\t\t}
  198. \t\t%}
  199. \t{% else %}
  200. \t\t{{ content|raw }}
  201. \t{% endif %}
  202. </div>""areas/image/view.html.twig""/var/www/snr/staging.nuernberger-bratwuerste.de/templates/areas/image/view.html.twig");
  203.     }
  204.     
  205.     public function checkSecurity()
  206.     {
  207.         static $tags = array("if" => 7"set" => 30"include" => 54);
  208.         static $filters = array("escape" => 10"trans" => 10"default" => 30"join" => 35"raw" => 61);
  209.         static $functions = array("pimcore_link" => 16"pimcore_checkbox" => 23"pimcore_image" => 40);
  210.         try {
  211.             $this->sandbox->checkSecurity(
  212.                 ['if''set''include'],
  213.                 ['escape''trans''default''join''raw'],
  214.                 ['pimcore_link''pimcore_checkbox''pimcore_image']
  215.             );
  216.         } catch (SecurityError $e) {
  217.             $e->setSourceContext($this->source);
  218.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  219.                 $e->setTemplateLine($tags[$e->getTagName()]);
  220.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  221.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  222.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  223.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  224.             }
  225.             throw $e;
  226.         }
  227.     }
  228. }