var/cache/dev/twig/6c/6c73e5e131da3e2fc236bf55b9bc870779cf6562b1260ecbcb164dbc22291026.php line 118

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/content-brick/partials/_gallery.html.twig */
  16. class __TwigTemplate_bd03f5cfb1da9bdf480fc7a0394669b7c4d256771079463dd8ceffc0d598b78f 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/content-brick/partials/_gallery.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/content-brick/partials/_gallery.html.twig"));
  40.         // line 1
  41.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'1$this->source); })())) {
  42.             // line 2
  43.             yield "    ";
  44.             if ((CoreExtension::getAttribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""gallery"), "isEmpty", [], "method"falsefalsetrue2) && array_key_exists("defaultGalleryItems"$context))) {
  45.                 // line 3
  46.                 yield "        ";
  47.                 yield from $this->loadTemplate("areas/content-brick/partials/_gallery.html.twig""areas/content-brick/partials/_gallery.html.twig"3"1652391233")->unwrap()->yield($context);
  48.                 // line 18
  49.                 yield "    ";
  50.             }
  51.             // line 19
  52.             yield "
  53.     ";
  54.             // line 20
  55.             $context['_parent'] = $context;
  56.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""gallery", ["reload" => true"limit" => 4]), "iterator", [], "any"falsefalsetrue20));
  57.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  58.                 // line 21
  59.                 yield "        ";
  60.                 yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image", ["thumbnail" => "gallery""reload" => "true""class" => "w-full""pictureAttributes" => ["class" => "w-full"]]);
  61.                 // line 28
  62.                 yield "
  63.     ";
  64.             }
  65.             $_parent $context['_parent'];
  66.             unset($context['_seq'], $context['_key'], $context['i'], $context['_parent']);
  67.             $context array_intersect_key($context$_parent) + $_parent;
  68.         } else {
  69.             // line 31
  70.             yield "    <div class=\"!-mx-5 md:!mx-auto md:rounded-md overflow-hidden swiper slideshow-swiper max-h-60 md:max-h-full\">
  71.         <div class=\" swiper-wrapper\">
  72.             ";
  73.             // line 34
  74.             yield "            ";
  75.             $context['_parent'] = $context;
  76.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""gallery", ["reload" => true"limit" => 4]), "iterator", [], "any"falsefalsetrue34));
  77.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  78.                 // line 35
  79.                 yield "                <div class=\"swiper-slide\">
  80.                     ";
  81.                 // line 36
  82.                 yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image", ["thumbnail" => "gallery""reload" => "true""pictureAttributes" => ["class" => "w-full block aspect-[4/3] rounded-md "], "imgAttributes" => ["class" => "w-full h-full object-cover object-center max-h-60 md:max-h-full"]]);
  83.                 // line 43
  84.                 yield "
  85.                 </div>
  86.             ";
  87.             }
  88.             $_parent $context['_parent'];
  89.             unset($context['_seq'], $context['_key'], $context['i'], $context['_parent']);
  90.             $context array_intersect_key($context$_parent) + $_parent;
  91.             // line 46
  92.             yield "
  93.             ";
  94.             // line 49
  95.             yield "            ";
  96.             if ((CoreExtension::getAttribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""gallery"), "isEmpty", [], "method"falsefalsetrue49) &&             // line 50
  97. array_key_exists("defaultGalleryItems"$context))) {
  98.                 // line 51
  99.                 yield "
  100.                 ";
  101.                 // line 52
  102.                 $context['_parent'] = $context;
  103.                 $context['_seq'] = CoreExtension::ensureTraversable((isset($context["defaultGalleryItems"]) || array_key_exists("defaultGalleryItems"$context) ? $context["defaultGalleryItems"] : (function () { throw new RuntimeError('Variable "defaultGalleryItems" does not exist.'52$this->source); })()));
  104.                 foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
  105.                     // line 53
  106.                     yield "                    <div class=\"swiper-slide\">
  107.                         ";
  108.                     // line 54
  109.                     yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["image"], "thumbnail", ["gallery"], "method"falsefalsetrue54), "html", [["pictureAttributes" => ["class" => "w-full block aspect-[4/3] rounded-md"], "imgAttributes" => ["class" => "w-full h-full object-cover object-center max-h-60 md:max-h-full"]]], "method"falsefalsetrue54), 54$this->source);
  110.                     // line 61
  111.                     yield "
  112.                     </div>
  113.                 ";
  114.                 }
  115.                 $_parent $context['_parent'];
  116.                 unset($context['_seq'], $context['_key'], $context['image'], $context['_parent']);
  117.                 $context array_intersect_key($context$_parent) + $_parent;
  118.                 // line 64
  119.                 yield "
  120.             ";
  121.             }
  122.             // line 66
  123.             yield "
  124.         </div>
  125.         <div class=\"absolute z-20 flex gap-2 bottom-4 right-4\">
  126.             <div class=\"custom-swiper-button-prev\">
  127.                 <svg class=\"w-4 h-3\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 12\">
  128.                     <path fill=\"#FFF\" fill-rule=\"evenodd\"
  129.                           d=\"M15.106 6.883H3.396l3.218 3.218a.885.885 0 1 1-1.252 1.252L.707 6.695a1 1 0 0 1 0-1.414L5.362.626a.885.885 0 1 1 1.252 1.252L3.396 5.095h11.71a.894.894 0 0 1 0 1.788Z\"/>
  130.                 </svg>
  131.             </div>
  132.             <div class=\"custom-swiper-button-next\">
  133.                 <svg class=\"w-4 h-3\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 12\">
  134.                     <path fill=\"#FFF\" fill-rule=\"evenodd\"
  135.                           d=\"M.894 5.095h11.71L9.386 1.878A.885.885 0 1 1 10.638.626l4.655 4.656a1 1 0 0 1 0 1.414l-4.655 4.656A.885.885 0 1 1 9.386 10.1l3.218-3.217H.894a.894.894 0 0 1 0-1.788Z\"/>
  136.                 </svg>
  137.             </div>
  138.         </div>
  139.     </div>
  140.     ";
  141.             // line 86
  142.             yield "    ";
  143.             if ( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'86$this->source); })())) {
  144.                 // line 87
  145.                 yield "        <div class=\"absolute z-20 hidden gap-2 ml-4 -mt-16 md:inline-flex\">
  146.             ";
  147.                 // line 89
  148.                 if (CoreExtension::getAttribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""gallery"), "getCount", [], "method"falsefalsetrue89)) {
  149.                     // line 90
  150.                     yield "                ";
  151.                     $context['_parent'] = $context;
  152.                     $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""gallery"), "iterator", [], "any"falsefalsetrue90));
  153.                     foreach ($context['_seq'] as $context["_key"] => $context["gallery"]) {
  154.                         // line 91
  155.                         yield "                    <div data-id=\"";
  156.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["gallery"] - (((true &&  !(null === 1))) ? (1) : ("0"))), "html"nulltrue);
  157.                         yield "\" class=\"cursor-pointer swiper-thumbnail\">
  158.                         ";
  159.                         // line 92
  160.                         yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image", ["thumbnail" => "gallery-navigation""pictureAttributes" => ["class" => "overflow-hidden inline-block w-10 h-10 rounded-md md:w-20 md:h-20 aspect-square"], "imgAttributes" => ["class" => "w-full h-full object-cover object-center"]]);
  161.                         // line 102
  162.                         yield "
  163.                     </div>
  164.                 ";
  165.                     }
  166.                     $_parent $context['_parent'];
  167.                     unset($context['_seq'], $context['_key'], $context['gallery'], $context['_parent']);
  168.                     $context array_intersect_key($context$_parent) + $_parent;
  169.                     // line 105
  170.                     yield "            ";
  171.                 }
  172.                 // line 106
  173.                 yield "
  174.             ";
  175.                 // line 107
  176.                 if ((CoreExtension::getAttribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""gallery"), "isEmpty", [], "method"falsefalsetrue107) &&                 // line 108
  177. array_key_exists("defaultGalleryItems"$context))) {
  178.                     // line 109
  179.                     yield "                ";
  180.                     $context['_parent'] = $context;
  181.                     $context['_seq'] = CoreExtension::ensureTraversable((isset($context["defaultGalleryItems"]) || array_key_exists("defaultGalleryItems"$context) ? $context["defaultGalleryItems"] : (function () { throw new RuntimeError('Variable "defaultGalleryItems" does not exist.'109$this->source); })()));
  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'] = === $length;
  194.                     }
  195.                     foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
  196.                         // line 110
  197.                         yield "                    <div data-id=\"";
  198.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsetrue110), 110$this->source), "html"nulltrue);
  199.                         yield "\" class=\"cursor-pointer swiper-thumbnail\">
  200.                         ";
  201.                         // line 111
  202.                         yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["image"], "thumbnail", ["gallery-navigation"], "method"falsefalsetrue111), "html", [["pictureAttributes" => ["class" => "overflow-hidden inline-block w-10 h-10 rounded-md md:w-20 md:h-20 aspect-square"], "imgAttributes" => ["class" => "w-full h-full object-cover object-center"]]], "method"falsefalsetrue111), 111$this->source);
  203.                         // line 120
  204.                         yield "
  205.                     </div>
  206.                 ";
  207.                         ++$context['loop']['index0'];
  208.                         ++$context['loop']['index'];
  209.                         $context['loop']['first'] = false;
  210.                         if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  211.                             --$context['loop']['revindex0'];
  212.                             --$context['loop']['revindex'];
  213.                             $context['loop']['last'] = === $context['loop']['revindex0'];
  214.                         }
  215.                     }
  216.                     $_parent $context['_parent'];
  217.                     unset($context['_seq'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
  218.                     $context array_intersect_key($context$_parent) + $_parent;
  219.                     // line 123
  220.                     yield "            ";
  221.                 }
  222.                 // line 124
  223.                 yield "        </div>
  224.     ";
  225.             }
  226.         }
  227.         
  228.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  229.         
  230.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  231.         yield from [];
  232.     }
  233.     /**
  234.      * @codeCoverageIgnore
  235.      */
  236.     public function getTemplateName(): string
  237.     {
  238.         return "areas/content-brick/partials/_gallery.html.twig";
  239.     }
  240.     /**
  241.      * @codeCoverageIgnore
  242.      */
  243.     public function isTraitable(): bool
  244.     {
  245.         return false;
  246.     }
  247.     /**
  248.      * @codeCoverageIgnore
  249.      */
  250.     public function getDebugInfo(): array
  251.     {
  252.         return array (  234 => 124,  231 => 123,  215 => 120,  213 => 111,  208 => 110,  190 => 109,  188 => 108,  187 => 107,  184 => 106,  181 => 105,  173 => 102,  171 => 92,  166 => 91,  161 => 90,  159 => 89,  155 => 87,  152 => 86,  132 => 66,  128 => 64,  120 => 61,  118 => 54,  115 => 53,  111 => 52,  108 => 51,  106 => 50,  104 => 49,  101 => 46,  93 => 43,  91 => 36,  88 => 35,  83 => 34,  79 => 31,  71 => 28,  68 => 21,  64 => 20,  61 => 19,  58 => 18,  55 => 3,  52 => 2,  50 => 1,);
  253.     }
  254.     public function getSourceContext(): Source
  255.     {
  256.         return new Source("{% if editmode %}
  257.     {% if pimcore_block('gallery').isEmpty() and defaultGalleryItems is defined %}
  258.         {% embed 'app/editmodenotice.html.twig' %}
  259.             {% block title %} Standaard Afbeeldingen automatisch geselecteerd {% endblock %}
  260.             {% block information %}
  261.                 Vanuit een koppeling met een gerelateerd Object zijn er afbeeldingen gekozen om te tonen.
  262.                 Indien u gebruik wenst te maken van andere afbeeldingen dan vult u hier nieuwe afbeeldingen.
  263.                 {% for image in defaultGalleryItems %}
  264.                     {{ image.thumbnail('gallery').html({
  265.                         'class':'w-full',
  266.                         'pictureAttributes': {
  267.                             class: 'w-full'
  268.                         }
  269.                     }) | raw }}
  270.                 {% endfor %}
  271.             {% endblock %}
  272.         {% endembed %}
  273.     {% endif %}
  274.     {% for i in pimcore_block('gallery', {'reload': true, 'limit' : 4}).iterator %}
  275.         {{ pimcore_image('image',
  276.             {
  277.                 'thumbnail': 'gallery',
  278.                 'reload': 'true',
  279.                 'class':'w-full',
  280.                 'pictureAttributes': {class: 'w-full'}
  281.             }
  282.         ) }}
  283.     {% endfor %}
  284. {% else %}
  285.     <div class=\"!-mx-5 md:!mx-auto md:rounded-md overflow-hidden swiper slideshow-swiper max-h-60 md:max-h-full\">
  286.         <div class=\" swiper-wrapper\">
  287.             {# Load the manually selectable gallery items #}
  288.             {% for i in pimcore_block('gallery', {'reload': true, 'limit' : 4}).iterator %}
  289.                 <div class=\"swiper-slide\">
  290.                     {{ pimcore_image('image',
  291.                         {
  292.                             'thumbnail': 'gallery',
  293.                             'reload': 'true',
  294.                             'pictureAttributes': {class: 'w-full block aspect-[4/3] rounded-md '},
  295.                             'imgAttributes': {class: 'w-full h-full object-cover object-center max-h-60 md:max-h-full'}
  296.                         }
  297.                     ) }}
  298.                 </div>
  299.             {% endfor %}
  300.             {# If a default set of gallery items is available and no manual gallery items are added
  301.             iterate through the supplied defaultGalleryItems. #}
  302.             {% if pimcore_block('gallery').isEmpty()
  303.                 and defaultGalleryItems is defined %}
  304.                 {% for image in defaultGalleryItems %}
  305.                     <div class=\"swiper-slide\">
  306.                         {{ image.thumbnail('gallery').html({
  307.                             'pictureAttributes': {
  308.                                 class: 'w-full block aspect-[4/3] rounded-md'
  309.                             },
  310.                             'imgAttributes': {
  311.                                 class: 'w-full h-full object-cover object-center max-h-60 md:max-h-full'
  312.                             }
  313.                         })|raw }}
  314.                     </div>
  315.                 {% endfor %}
  316.             {% endif %}
  317.         </div>
  318.         <div class=\"absolute z-20 flex gap-2 bottom-4 right-4\">
  319.             <div class=\"custom-swiper-button-prev\">
  320.                 <svg class=\"w-4 h-3\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 12\">
  321.                     <path fill=\"#FFF\" fill-rule=\"evenodd\"
  322.                           d=\"M15.106 6.883H3.396l3.218 3.218a.885.885 0 1 1-1.252 1.252L.707 6.695a1 1 0 0 1 0-1.414L5.362.626a.885.885 0 1 1 1.252 1.252L3.396 5.095h11.71a.894.894 0 0 1 0 1.788Z\"/>
  323.                 </svg>
  324.             </div>
  325.             <div class=\"custom-swiper-button-next\">
  326.                 <svg class=\"w-4 h-3\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 12\">
  327.                     <path fill=\"#FFF\" fill-rule=\"evenodd\"
  328.                           d=\"M.894 5.095h11.71L9.386 1.878A.885.885 0 1 1 10.638.626l4.655 4.656a1 1 0 0 1 0 1.414l-4.655 4.656A.885.885 0 1 1 9.386 10.1l3.218-3.217H.894a.894.894 0 0 1 0-1.788Z\"/>
  329.                 </svg>
  330.             </div>
  331.         </div>
  332.     </div>
  333.     {# Do not iterate gallery block twice in editmode as this breaks pimcore admin editmode.
  334.         Pimcore will try and create two gallery items and this results in a name conflict. #}
  335.     {% if not editmode %}
  336.         <div class=\"absolute z-20 hidden gap-2 ml-4 -mt-16 md:inline-flex\">
  337.             {% if pimcore_block('gallery').getCount() %}
  338.                 {% for gallery in pimcore_block('gallery').iterator %}
  339.                     <div data-id=\"{{ gallery-1 ?? \"0\" }}\" class=\"cursor-pointer swiper-thumbnail\">
  340.                         {{ pimcore_image('image',
  341.                             {
  342.                                 'thumbnail': 'gallery-navigation',
  343.                                 'pictureAttributes': {
  344.                                     class: 'overflow-hidden inline-block w-10 h-10 rounded-md md:w-20 md:h-20 aspect-square'
  345.                                 },
  346.                                 'imgAttributes': {
  347.                                     class: 'w-full h-full object-cover object-center'
  348.                                 }
  349.                             }
  350.                         ) }}
  351.                     </div>
  352.                 {% endfor %}
  353.             {% endif %}
  354.             {% if pimcore_block('gallery').isEmpty()
  355.                 and defaultGalleryItems is defined %}
  356.                 {% for image in defaultGalleryItems %}
  357.                     <div data-id=\"{{ loop.index0 }}\" class=\"cursor-pointer swiper-thumbnail\">
  358.                         {{ image.thumbnail('gallery-navigation').html(
  359.                             {
  360.                                 'pictureAttributes': {
  361.                                     class: 'overflow-hidden inline-block w-10 h-10 rounded-md md:w-20 md:h-20 aspect-square'
  362.                                 },
  363.                                 'imgAttributes': {
  364.                                     class: 'w-full h-full object-cover object-center'
  365.                                 }
  366.                             }
  367.                         )|raw }}
  368.                     </div>
  369.                 {% endfor %}
  370.             {% endif %}
  371.         </div>
  372.     {% endif %}
  373. {% endif %}
  374. ""areas/content-brick/partials/_gallery.html.twig""/home/forge/testing.coolworld.ptchr.dev/templates/areas/content-brick/partials/_gallery.html.twig");
  375.     }
  376.     
  377.     public function checkSecurity()
  378.     {
  379.         static $tags = ["if" => 1"embed" => 3"for" => 20];
  380.         static $filters = ["raw" => 61"escape" => 91];
  381.         static $functions = ["pimcore_block" => 2"pimcore_image" => 21];
  382.         try {
  383.             $this->sandbox->checkSecurity(
  384.                 ['if''embed''for'],
  385.                 ['raw''escape'],
  386.                 ['pimcore_block''pimcore_image'],
  387.                 $this->source
  388.             );
  389.         } catch (SecurityError $e) {
  390.             $e->setSourceContext($this->source);
  391.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  392.                 $e->setTemplateLine($tags[$e->getTagName()]);
  393.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  394.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  395.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  396.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  397.             }
  398.             throw $e;
  399.         }
  400.     }
  401. }
  402. /* areas/content-brick/partials/_gallery.html.twig */
  403. class __TwigTemplate_bd03f5cfb1da9bdf480fc7a0394669b7c4d256771079463dd8ceffc0d598b78f___1652391233 extends Template
  404. {
  405.     private Source $source;
  406.     /**
  407.      * @var array<string, Template>
  408.      */
  409.     private array $macros = [];
  410.     public function __construct(Environment $env)
  411.     {
  412.         parent::__construct($env);
  413.         $this->source $this->getSourceContext();
  414.         $this->blocks = [
  415.             'title' => [$this'block_title'],
  416.             'information' => [$this'block_information'],
  417.         ];
  418.         $this->sandbox $this->extensions[SandboxExtension::class];
  419.         $this->checkSecurity();
  420.     }
  421.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  422.     {
  423.         // line 3
  424.         return "app/editmodenotice.html.twig";
  425.     }
  426.     protected function doDisplay(array $context, array $blocks = []): iterable
  427.     {
  428.         $macros $this->macros;
  429.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  430.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/content-brick/partials/_gallery.html.twig"));
  431.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  432.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/content-brick/partials/_gallery.html.twig"));
  433.         $this->parent $this->loadTemplate("app/editmodenotice.html.twig""areas/content-brick/partials/_gallery.html.twig"3);
  434.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  435.         
  436.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  437.         
  438.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  439.     }
  440.     // line 4
  441.     /**
  442.      * @return iterable<null|scalar|\Stringable>
  443.      */
  444.     public function block_title(array $context, array $blocks = []): iterable
  445.     {
  446.         $macros $this->macros;
  447.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  448.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  449.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  450.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  451.         yield " Standaard Afbeeldingen automatisch geselecteerd ";
  452.         
  453.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  454.         
  455.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  456.         yield from [];
  457.     }
  458.     // line 5
  459.     /**
  460.      * @return iterable<null|scalar|\Stringable>
  461.      */
  462.     public function block_information(array $context, array $blocks = []): iterable
  463.     {
  464.         $macros $this->macros;
  465.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  466.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""information"));
  467.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  468.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""information"));
  469.         // line 6
  470.         yield "                Vanuit een koppeling met een gerelateerd Object zijn er afbeeldingen gekozen om te tonen.
  471.                 Indien u gebruik wenst te maken van andere afbeeldingen dan vult u hier nieuwe afbeeldingen.
  472.                 ";
  473.         // line 8
  474.         $context['_parent'] = $context;
  475.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["defaultGalleryItems"]) || array_key_exists("defaultGalleryItems"$context) ? $context["defaultGalleryItems"] : (function () { throw new RuntimeError('Variable "defaultGalleryItems" does not exist.'8$this->source); })()));
  476.         foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
  477.             // line 9
  478.             yield "                    ";
  479.             yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["image"], "thumbnail", ["gallery"], "method"falsefalsetrue9), "html", [["class" => "w-full""pictureAttributes" => ["class" => "w-full"]]], "method"falsefalsetrue9), 9$this->source);
  480.             // line 14
  481.             yield "
  482.                 ";
  483.         }
  484.         $_parent $context['_parent'];
  485.         unset($context['_seq'], $context['_key'], $context['image'], $context['_parent']);
  486.         $context array_intersect_key($context$_parent) + $_parent;
  487.         // line 16
  488.         yield "            ";
  489.         
  490.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  491.         
  492.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  493.         yield from [];
  494.     }
  495.     /**
  496.      * @codeCoverageIgnore
  497.      */
  498.     public function getTemplateName(): string
  499.     {
  500.         return "areas/content-brick/partials/_gallery.html.twig";
  501.     }
  502.     /**
  503.      * @codeCoverageIgnore
  504.      */
  505.     public function isTraitable(): bool
  506.     {
  507.         return false;
  508.     }
  509.     /**
  510.      * @codeCoverageIgnore
  511.      */
  512.     public function getDebugInfo(): array
  513.     {
  514.         return array (  536 => 16,  529 => 14,  526 => 9,  522 => 8,  518 => 6,  505 => 5,  482 => 4,  459 => 3,  234 => 124,  231 => 123,  215 => 120,  213 => 111,  208 => 110,  190 => 109,  188 => 108,  187 => 107,  184 => 106,  181 => 105,  173 => 102,  171 => 92,  166 => 91,  161 => 90,  159 => 89,  155 => 87,  152 => 86,  132 => 66,  128 => 64,  120 => 61,  118 => 54,  115 => 53,  111 => 52,  108 => 51,  106 => 50,  104 => 49,  101 => 46,  93 => 43,  91 => 36,  88 => 35,  83 => 34,  79 => 31,  71 => 28,  68 => 21,  64 => 20,  61 => 19,  58 => 18,  55 => 3,  52 => 2,  50 => 1,);
  515.     }
  516.     public function getSourceContext(): Source
  517.     {
  518.         return new Source("{% if editmode %}
  519.     {% if pimcore_block('gallery').isEmpty() and defaultGalleryItems is defined %}
  520.         {% embed 'app/editmodenotice.html.twig' %}
  521.             {% block title %} Standaard Afbeeldingen automatisch geselecteerd {% endblock %}
  522.             {% block information %}
  523.                 Vanuit een koppeling met een gerelateerd Object zijn er afbeeldingen gekozen om te tonen.
  524.                 Indien u gebruik wenst te maken van andere afbeeldingen dan vult u hier nieuwe afbeeldingen.
  525.                 {% for image in defaultGalleryItems %}
  526.                     {{ image.thumbnail('gallery').html({
  527.                         'class':'w-full',
  528.                         'pictureAttributes': {
  529.                             class: 'w-full'
  530.                         }
  531.                     }) | raw }}
  532.                 {% endfor %}
  533.             {% endblock %}
  534.         {% endembed %}
  535.     {% endif %}
  536.     {% for i in pimcore_block('gallery', {'reload': true, 'limit' : 4}).iterator %}
  537.         {{ pimcore_image('image',
  538.             {
  539.                 'thumbnail': 'gallery',
  540.                 'reload': 'true',
  541.                 'class':'w-full',
  542.                 'pictureAttributes': {class: 'w-full'}
  543.             }
  544.         ) }}
  545.     {% endfor %}
  546. {% else %}
  547.     <div class=\"!-mx-5 md:!mx-auto md:rounded-md overflow-hidden swiper slideshow-swiper max-h-60 md:max-h-full\">
  548.         <div class=\" swiper-wrapper\">
  549.             {# Load the manually selectable gallery items #}
  550.             {% for i in pimcore_block('gallery', {'reload': true, 'limit' : 4}).iterator %}
  551.                 <div class=\"swiper-slide\">
  552.                     {{ pimcore_image('image',
  553.                         {
  554.                             'thumbnail': 'gallery',
  555.                             'reload': 'true',
  556.                             'pictureAttributes': {class: 'w-full block aspect-[4/3] rounded-md '},
  557.                             'imgAttributes': {class: 'w-full h-full object-cover object-center max-h-60 md:max-h-full'}
  558.                         }
  559.                     ) }}
  560.                 </div>
  561.             {% endfor %}
  562.             {# If a default set of gallery items is available and no manual gallery items are added
  563.             iterate through the supplied defaultGalleryItems. #}
  564.             {% if pimcore_block('gallery').isEmpty()
  565.                 and defaultGalleryItems is defined %}
  566.                 {% for image in defaultGalleryItems %}
  567.                     <div class=\"swiper-slide\">
  568.                         {{ image.thumbnail('gallery').html({
  569.                             'pictureAttributes': {
  570.                                 class: 'w-full block aspect-[4/3] rounded-md'
  571.                             },
  572.                             'imgAttributes': {
  573.                                 class: 'w-full h-full object-cover object-center max-h-60 md:max-h-full'
  574.                             }
  575.                         })|raw }}
  576.                     </div>
  577.                 {% endfor %}
  578.             {% endif %}
  579.         </div>
  580.         <div class=\"absolute z-20 flex gap-2 bottom-4 right-4\">
  581.             <div class=\"custom-swiper-button-prev\">
  582.                 <svg class=\"w-4 h-3\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 12\">
  583.                     <path fill=\"#FFF\" fill-rule=\"evenodd\"
  584.                           d=\"M15.106 6.883H3.396l3.218 3.218a.885.885 0 1 1-1.252 1.252L.707 6.695a1 1 0 0 1 0-1.414L5.362.626a.885.885 0 1 1 1.252 1.252L3.396 5.095h11.71a.894.894 0 0 1 0 1.788Z\"/>
  585.                 </svg>
  586.             </div>
  587.             <div class=\"custom-swiper-button-next\">
  588.                 <svg class=\"w-4 h-3\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 12\">
  589.                     <path fill=\"#FFF\" fill-rule=\"evenodd\"
  590.                           d=\"M.894 5.095h11.71L9.386 1.878A.885.885 0 1 1 10.638.626l4.655 4.656a1 1 0 0 1 0 1.414l-4.655 4.656A.885.885 0 1 1 9.386 10.1l3.218-3.217H.894a.894.894 0 0 1 0-1.788Z\"/>
  591.                 </svg>
  592.             </div>
  593.         </div>
  594.     </div>
  595.     {# Do not iterate gallery block twice in editmode as this breaks pimcore admin editmode.
  596.         Pimcore will try and create two gallery items and this results in a name conflict. #}
  597.     {% if not editmode %}
  598.         <div class=\"absolute z-20 hidden gap-2 ml-4 -mt-16 md:inline-flex\">
  599.             {% if pimcore_block('gallery').getCount() %}
  600.                 {% for gallery in pimcore_block('gallery').iterator %}
  601.                     <div data-id=\"{{ gallery-1 ?? \"0\" }}\" class=\"cursor-pointer swiper-thumbnail\">
  602.                         {{ pimcore_image('image',
  603.                             {
  604.                                 'thumbnail': 'gallery-navigation',
  605.                                 'pictureAttributes': {
  606.                                     class: 'overflow-hidden inline-block w-10 h-10 rounded-md md:w-20 md:h-20 aspect-square'
  607.                                 },
  608.                                 'imgAttributes': {
  609.                                     class: 'w-full h-full object-cover object-center'
  610.                                 }
  611.                             }
  612.                         ) }}
  613.                     </div>
  614.                 {% endfor %}
  615.             {% endif %}
  616.             {% if pimcore_block('gallery').isEmpty()
  617.                 and defaultGalleryItems is defined %}
  618.                 {% for image in defaultGalleryItems %}
  619.                     <div data-id=\"{{ loop.index0 }}\" class=\"cursor-pointer swiper-thumbnail\">
  620.                         {{ image.thumbnail('gallery-navigation').html(
  621.                             {
  622.                                 'pictureAttributes': {
  623.                                     class: 'overflow-hidden inline-block w-10 h-10 rounded-md md:w-20 md:h-20 aspect-square'
  624.                                 },
  625.                                 'imgAttributes': {
  626.                                     class: 'w-full h-full object-cover object-center'
  627.                                 }
  628.                             }
  629.                         )|raw }}
  630.                     </div>
  631.                 {% endfor %}
  632.             {% endif %}
  633.         </div>
  634.     {% endif %}
  635. {% endif %}
  636. ""areas/content-brick/partials/_gallery.html.twig""/home/forge/testing.coolworld.ptchr.dev/templates/areas/content-brick/partials/_gallery.html.twig");
  637.     }
  638.     
  639.     public function checkSecurity()
  640.     {
  641.         static $tags = ["extends" => 3"for" => 8];
  642.         static $filters = ["raw" => 14];
  643.         static $functions = [];
  644.         try {
  645.             $this->sandbox->checkSecurity(
  646.                 ['extends''for'],
  647.                 ['raw'],
  648.                 [],
  649.                 $this->source
  650.             );
  651.         } catch (SecurityError $e) {
  652.             $e->setSourceContext($this->source);
  653.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  654.                 $e->setTemplateLine($tags[$e->getTagName()]);
  655.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  656.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  657.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  658.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  659.             }
  660.             throw $e;
  661.         }
  662.     }
  663. }