var/cache/dev/twig/7b/7ba57094626a86f2c45f28238fffb28f.php line 197

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. /* @ElementsDemiFrontend/Accommodation/includes/acco-pictures.desktop.html.twig */
  14. class __TwigTemplate_6c0412028bbc0fc0a0b69a2741866a56 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""@ElementsDemiFrontend/Accommodation/includes/acco-pictures.desktop.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""@ElementsDemiFrontend/Accommodation/includes/acco-pictures.desktop.html.twig"));
  35.         // line 1
  36.         $context["videoCount"] = ((array_key_exists("videoCount"$context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["videoCount"]) || array_key_exists("videoCount"$context) ? $context["videoCount"] : (function () { throw new RuntimeError('Variable "videoCount" does not exist.'1$this->source); })()), 1$this->source), 0)) : (0));
  37.         // line 2
  38.         $context["panoCount"] = ((array_key_exists("panoCount"$context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed((isset($context["panoCount"]) || array_key_exists("panoCount"$context) ? $context["panoCount"] : (function () { throw new RuntimeError('Variable "panoCount" does not exist.'2$this->source); })()), 2$this->source), 0)) : (0));
  39.         // line 3
  40.         $context["package"] = ((array_key_exists("package"$context)) ? ((isset($context["package"]) || array_key_exists("package"$context) ? $context["package"] : (function () { throw new RuntimeError('Variable "package" does not exist.'3$this->source); })())) : (null));
  41.         // line 4
  42.         echo "<section class=\"mt-4\">
  43.     ";
  44.         // line 5
  45.         if ((((isset($context["videoCount"]) || array_key_exists("videoCount"$context) ? $context["videoCount"] : (function () { throw new RuntimeError('Variable "videoCount" does not exist.'5$this->source); })()) > 0) || ((isset($context["panoCount"]) || array_key_exists("panoCount"$context) ? $context["panoCount"] : (function () { throw new RuntimeError('Variable "panoCount" does not exist.'5$this->source); })()) > 0))) {
  46.             // line 6
  47.             echo "    <div data-track-content data-content-name=\"";
  48.             echo (((isset($context["package"]) || array_key_exists("package"$context) ? $context["package"] : (function () { throw new RuntimeError('Variable "package" does not exist.'6$this->source); })())) ? ("package-") : ("accommodation-"));
  49.             echo "media-links\">
  50.         <div class=\"row\">
  51.             ";
  52.             // line 8
  53.             if (((isset($context["videoCount"]) || array_key_exists("videoCount"$context) ? $context["videoCount"] : (function () { throw new RuntimeError('Variable "videoCount" does not exist.'8$this->source); })()) > 0)) {
  54.                 // line 9
  55.                 echo "                ";
  56.                 $context["s"] = ((((isset($context["videoCount"]) || array_key_exists("videoCount"$context) ? $context["videoCount"] : (function () { throw new RuntimeError('Variable "videoCount" does not exist.'9$this->source); })()) == 1)) ? ("") : ("s"));
  57.                 // line 10
  58.                 echo "                ";
  59.                 $context["headline"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("demi.detail.video" $this->sandbox->ensureToStringAllowed((isset($context["s"]) || array_key_exists("s"$context) ? $context["s"] : (function () { throw new RuntimeError('Variable "s" does not exist.'10$this->source); })()), 10$this->source)) . "-gallery-button"));
  60.                 // line 11
  61.                 echo "                ";
  62.                 $context["headline"] = twig_replace_filter($this->sandbox->ensureToStringAllowed((isset($context["headline"]) || array_key_exists("headline"$context) ? $context["headline"] : (function () { throw new RuntimeError('Variable "headline" does not exist.'11$this->source); })()), 11$this->source), ["[AMOUNT_IMAGES]" => ""]);
  63.                 // line 12
  64.                 echo "
  65.                 <div class=\"col-6\">
  66.                     <h2 class=\"mb-4 text-primary\">";
  67.                 // line 14
  68.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["headline"]) || array_key_exists("headline"$context) ? $context["headline"] : (function () { throw new RuntimeError('Variable "headline" does not exist.'14$this->source); })()), 14$this->source), "html"nulltrue);
  69.                 echo "</h2>
  70.                     ";
  71.                 // line 15
  72.                 $context['_parent'] = $context;
  73.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["impressionLinks"]) || array_key_exists("impressionLinks"$context) ? $context["impressionLinks"] : (function () { throw new RuntimeError('Variable "impressionLinks" does not exist.'15$this->source); })()), "video", [], "array"falsefalsetrue15));
  74.                 foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  75.                     // line 16
  76.                     echo "                        ";
  77.                     $context["url"] = $this->env->getFunction('demi_parseUrl')->getCallable()(twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["item"], "getUrl", [], "method"falsefalsetrue16), 16$this->source), "html"));
  78.                     // line 17
  79.                     echo "                        ";
  80.                     if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["url"]) || array_key_exists("url"$context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.'17$this->source); })()), "host", [], "array"falsefalsetrue17))) {
  81.                         // line 18
  82.                         echo "                            <a href=\"";
  83.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["item"], "getUrl", [], "method"falsefalsetrue18), 18$this->source), "html");
  84.                         echo "\" class=\"btn btn-primary mr-2 mb-2\" target=\"_blank\">
  85.                                 <span class=\"btn__icon demi-icon demi-icon-play-circle mr-2\" aria-hidden=\"true\"></span>";
  86.                         // line 19
  87.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["item"], "getName", [], "method"falsefalsetrue19), 19$this->source), "html"nulltrue);
  88.                         echo "
  89.                             </a>
  90.                         ";
  91.                     }
  92.                     // line 22
  93.                     echo "                    ";
  94.                 }
  95.                 $_parent $context['_parent'];
  96.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  97.                 $context array_intersect_key($context$_parent) + $_parent;
  98.                 // line 23
  99.                 echo "                </div>
  100.             ";
  101.             }
  102.             // line 26
  103.             echo "            ";
  104.             if (((isset($context["panoCount"]) || array_key_exists("panoCount"$context) ? $context["panoCount"] : (function () { throw new RuntimeError('Variable "panoCount" does not exist.'26$this->source); })()) > 0)) {
  105.                 // line 27
  106.                 echo "                ";
  107.                 $context["s"] = ((((isset($context["panoCount"]) || array_key_exists("panoCount"$context) ? $context["panoCount"] : (function () { throw new RuntimeError('Variable "panoCount" does not exist.'27$this->source); })()) == 1)) ? ("") : ("s"));
  108.                 // line 28
  109.                 echo "                ";
  110.                 $context["headline"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("demi.detail.panorama" $this->sandbox->ensureToStringAllowed((isset($context["s"]) || array_key_exists("s"$context) ? $context["s"] : (function () { throw new RuntimeError('Variable "s" does not exist.'28$this->source); })()), 28$this->source)) . "-gallery-button"));
  111.                 // line 29
  112.                 echo "                ";
  113.                 $context["headline"] = twig_replace_filter($this->sandbox->ensureToStringAllowed((isset($context["headline"]) || array_key_exists("headline"$context) ? $context["headline"] : (function () { throw new RuntimeError('Variable "headline" does not exist.'29$this->source); })()), 29$this->source), ["[AMOUNT_IMAGES]" => ""]);
  114.                 // line 30
  115.                 echo "
  116.                 <div class=\"col-6\">
  117.                     <h2 class=\"mb-4 text-primary\">360° ";
  118.                 // line 32
  119.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["headline"]) || array_key_exists("headline"$context) ? $context["headline"] : (function () { throw new RuntimeError('Variable "headline" does not exist.'32$this->source); })()), 32$this->source), "html"nulltrue);
  120.                 echo "</h2>
  121.                     ";
  122.                 // line 33
  123.                 $context['_parent'] = $context;
  124.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["impressionLinks"]) || array_key_exists("impressionLinks"$context) ? $context["impressionLinks"] : (function () { throw new RuntimeError('Variable "impressionLinks" does not exist.'33$this->source); })()), "pano", [], "array"falsefalsetrue33));
  125.                 foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  126.                     // line 34
  127.                     echo "                        ";
  128.                     $context["url"] = $this->env->getFunction('demi_parseUrl')->getCallable()($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["item"], "getUrl", [], "method"falsefalsetrue34), 34$this->source));
  129.                     // line 35
  130.                     echo "                        ";
  131.                     if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["url"]) || array_key_exists("url"$context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.'35$this->source); })()), "host", [], "array"falsefalsetrue35))) {
  132.                         // line 36
  133.                         echo "                        <a target=\"_blank\" href=\"";
  134.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["item"], "getUrl", [], "method"falsefalsetrue36), 36$this->source), "html"nulltrue);
  135.                         echo "\" class=\"btn btn-primary mr-2 mb-2\">
  136.                             <span class=\"btn__icon demi-icon demi-icon-play-circle mr-2\" aria-hidden=\"true\"></span>";
  137.                         // line 37
  138.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["item"], "getName", [], "method"falsefalsetrue37), 37$this->source), "html"nulltrue);
  139.                         echo "
  140.                         </a>
  141.                         ";
  142.                     }
  143.                     // line 40
  144.                     echo "                     ";
  145.                 }
  146.                 $_parent $context['_parent'];
  147.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  148.                 $context array_intersect_key($context$_parent) + $_parent;
  149.                 // line 41
  150.                 echo "                </div>
  151.             ";
  152.             }
  153.             // line 43
  154.             echo "        </div>
  155.     </div>
  156.     <hr class=\"hr--border-gray my-5\">
  157.     ";
  158.         }
  159.         // line 47
  160.         echo "
  161.     <div data-track-content data-content-name=\"";
  162.         // line 48
  163.         echo (((isset($context["package"]) || array_key_exists("package"$context) ? $context["package"] : (function () { throw new RuntimeError('Variable "package" does not exist.'48$this->source); })())) ? ("package-") : ("accommodation-"));
  164.         echo "gallery\">
  165.     ";
  166.         // line 49
  167.         if (((isset($context["photoCount"]) || array_key_exists("photoCount"$context) ? $context["photoCount"] : (function () { throw new RuntimeError('Variable "photoCount" does not exist.'49$this->source); })()) > 0)) {
  168.             // line 50
  169.             echo "            ";
  170.             $context["s"] = ((((isset($context["photoCount"]) || array_key_exists("photoCount"$context) ? $context["photoCount"] : (function () { throw new RuntimeError('Variable "photoCount" does not exist.'50$this->source); })()) == 1)) ? ("") : ("s"));
  171.             // line 51
  172.             echo "            ";
  173.             $context["headline"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("demi.detail.image" $this->sandbox->ensureToStringAllowed((isset($context["s"]) || array_key_exists("s"$context) ? $context["s"] : (function () { throw new RuntimeError('Variable "s" does not exist.'51$this->source); })()), 51$this->source)) . "-gallery-button"));
  174.             // line 52
  175.             echo "            ";
  176.             $context["headline"] = twig_replace_filter($this->sandbox->ensureToStringAllowed((isset($context["headline"]) || array_key_exists("headline"$context) ? $context["headline"] : (function () { throw new RuntimeError('Variable "headline" does not exist.'52$this->source); })()), 52$this->source), ["[AMOUNT_IMAGES]" => ""]);
  177.             // line 53
  178.             echo "            ";
  179.             $context["fullPathLighbox"] = twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'53$this->source); })()), "getFullPath", [], "method"falsefalsetrue53);
  180.             // line 54
  181.             echo "
  182.             ";
  183.             // line 55
  184.             if (((isset($context["fullPathLighbox"]) || array_key_exists("fullPathLighbox"$context) ? $context["fullPathLighbox"] : (function () { throw new RuntimeError('Variable "fullPathLighbox" does not exist.'55$this->source); })()) != "")) {
  185.                 // line 56
  186.                 echo "                ";
  187.                 $context["lightboxTopBarUrl"] = $this->env->getFunction('pimcore_url')->getCallable()(["path" => twig_trim_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'56$this->source); })()), "getFullPath", [], "method"falsefalsetrue56), 56$this->source), "/""right")], "demi_lightbox_topbar_content");
  188.                 // line 57
  189.                 echo "                ";
  190.                 if (twig_matches("@^//.*@", (isset($context["lightboxTopBarUrl"]) || array_key_exists("lightboxTopBarUrl"$context) ? $context["lightboxTopBarUrl"] : (function () { throw new RuntimeError('Variable "lightboxTopBarUrl" does not exist.'57$this->source); })()))) {
  191.                     // line 58
  192.                     echo "                    ";
  193.                     $context["lightboxTopBarUrl"] = twig_replace_filter($this->sandbox->ensureToStringAllowed((isset($context["lightboxTopBarUrl"]) || array_key_exists("lightboxTopBarUrl"$context) ? $context["lightboxTopBarUrl"] : (function () { throw new RuntimeError('Variable "lightboxTopBarUrl" does not exist.'58$this->source); })()), 58$this->source), ["//" => "/"]);
  194.                     // line 59
  195.                     echo "                ";
  196.                 }
  197.                 // line 60
  198.                 echo "            ";
  199.             }
  200.             // line 61
  201.             echo "
  202.             <h2 class=\"mb-4 text-primary\">";
  203.             // line 62
  204.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["headline"]) || array_key_exists("headline"$context) ? $context["headline"] : (function () { throw new RuntimeError('Variable "headline" does not exist.'62$this->source); })()), 62$this->source), "html"nulltrue);
  205.             echo "</h2>
  206.             <div class=\"js-lightbox-group js-object-images__container\" ";
  207.             // line 63
  208.             if ( !array_key_exists("additionalService"$context)) {
  209.                 echo "data-lightbox-topbar-content-url=\"";
  210.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["lightboxTopBarUrl"]) || array_key_exists("lightboxTopBarUrl"$context) ? $context["lightboxTopBarUrl"] : (function () { throw new RuntimeError('Variable "lightboxTopBarUrl" does not exist.'63$this->source); })()), 63$this->source), "html"nulltrue);
  211.                 echo ((twig_in_filter("?", (isset($context["lightboxTopBarUrl"]) || array_key_exists("lightboxTopBarUrl"$context) ? $context["lightboxTopBarUrl"] : (function () { throw new RuntimeError('Variable "lightboxTopBarUrl" does not exist.'63$this->source); })()))) ? ("&") : ("?"));
  212.                 echo "id=";
  213.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["accoId"]) || array_key_exists("accoId"$context) ? $context["accoId"] : (function () { throw new RuntimeError('Variable "accoId" does not exist.'63$this->source); })()), 63$this->source), "html"nulltrue);
  214.                 ((array_key_exists("housePackageMasterId"$context)) ? (print (twig_escape_filter($this->env, ("&pid=" . (isset($context["housePackageMasterId"]) || array_key_exists("housePackageMasterId"$context) ? $context["housePackageMasterId"] : (function () { throw new RuntimeError('Variable "housePackageMasterId" does not exist.'63$this->source); })())), "html"nulltrue))) : (print ("")));
  215.                 echo "\" data-lightbox-topbar-wrapper=\"#lightboxTopBar\"";
  216.             }
  217.             echo ">
  218.                 ";
  219.             // line 64
  220.             $context["imageArray"] = [];
  221.             // line 65
  222.             echo "                ";
  223.             $context["countGaId"] = 1;
  224.             // line 66
  225.             echo "                ";
  226.             $context["countImages"] = 1;
  227.             // line 67
  228.             echo "                ";
  229.             $context["imageAmount"] = [344];
  230.             // line 68
  231.             echo "                ";
  232.             $context["ogimagecount"] = 0;
  233.             // line 69
  234.             echo "                ";
  235.             $context["images"] = [];
  236.             // line 70
  237.             echo "                ";
  238.             $context['_parent'] = $context;
  239.             $context['_seq'] = twig_ensure_traversable((isset($context["imageList"]) || array_key_exists("imageList"$context) ? $context["imageList"] : (function () { throw new RuntimeError('Variable "imageList" does not exist.'70$this->source); })()));
  240.             $context['loop'] = [
  241.               'parent' => $context['_parent'],
  242.               'index0' => 0,
  243.               'index'  => 1,
  244.               'first'  => true,
  245.             ];
  246.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  247.                 $length count($context['_seq']);
  248.                 $context['loop']['revindex0'] = $length 1;
  249.                 $context['loop']['revindex'] = $length;
  250.                 $context['loop']['length'] = $length;
  251.                 $context['loop']['last'] = === $length;
  252.             }
  253.             foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
  254.                 // line 71
  255.                 echo "                    ";
  256.                 if (((isset($context["ogimagecount"]) || array_key_exists("ogimagecount"$context) ? $context["ogimagecount"] : (function () { throw new RuntimeError('Variable "ogimagecount" does not exist.'71$this->source); })()) < 5)) {
  257.                     // line 72
  258.                     echo "                        ";
  259.                     twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsOpenGraph(), "setImages", [twig_array_merge(twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsOpenGraph(), "getImages", [], "any"falsefalsetrue72), [(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'72$this->source); })()), "request", [], "any"falsefalsetrue72), "getHost", [], "method"falsefalsetrue72) . $context["image"])])], "method"falsefalsetrue72);
  260.                     // line 73
  261.                     echo "                        ";
  262.                     $context["ogimagecount"] = ((isset($context["ogimagecount"]) || array_key_exists("ogimagecount"$context) ? $context["ogimagecount"] : (function () { throw new RuntimeError('Variable "ogimagecount" does not exist.'73$this->source); })()) + 1);
  263.                     // line 74
  264.                     echo "                    ";
  265.                 }
  266.                 // line 75
  267.                 echo "                    ";
  268.                 $context["images"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'75$this->source); })()), 75$this->source), [((isset($context["countImages"]) || array_key_exists("countImages"$context) ? $context["countImages"] : (function () { throw new RuntimeError('Variable "countImages" does not exist.'75$this->source); })()) - 1) => $context["image"]]);
  269.                 // line 76
  270.                 echo "                    ";
  271.                 if (((isset($context["countImages"]) || array_key_exists("countImages"$context) ? $context["countImages"] : (function () { throw new RuntimeError('Variable "countImages" does not exist.'76$this->source); })()) == twig_get_attribute($this->env$this->source, (isset($context["imageAmount"]) || array_key_exists("imageAmount"$context) ? $context["imageAmount"] : (function () { throw new RuntimeError('Variable "imageAmount" does not exist.'76$this->source); })()), ((isset($context["countGaId"]) || array_key_exists("countGaId"$context) ? $context["countGaId"] : (function () { throw new RuntimeError('Variable "countGaId" does not exist.'76$this->source); })()) - 1), [], "array"falsefalsetrue76))) {
  272.                     // line 77
  273.                     echo "                        ";
  274.                     $context["galId"] = ((isset($context["countGaId"]) || array_key_exists("countGaId"$context) ? $context["countGaId"] : (function () { throw new RuntimeError('Variable "countGaId" does not exist.'77$this->source); })()) % 4);
  275.                     // line 78
  276.                     echo "                        ";
  277.                     echo twig_include($this->env$context, (("@ElementsDemiFrontend/Accommodation/includes/acco-gallery-row-type" $this->sandbox->ensureToStringAllowed((isset($context["galId"]) || array_key_exists("galId"$context) ? $context["galId"] : (function () { throw new RuntimeError('Variable "galId" does not exist.'78$this->source); })()), 78$this->source)) . ".html.twig"), ["images" =>                     // line 79
  278. (isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'79$this->source); })())]);
  279.                     // line 80
  280.                     echo "
  281.                         ";
  282.                     // line 81
  283.                     $context["countImages"] = 0;
  284.                     // line 82
  285.                     echo "                        ";
  286.                     $context["images"] = [];
  287.                     // line 83
  288.                     echo "                        ";
  289.                     $context["countGaId"] = ((((isset($context["countGaId"]) || array_key_exists("countGaId"$context) ? $context["countGaId"] : (function () { throw new RuntimeError('Variable "countGaId" does not exist.'83$this->source); })()) == 3)) ? (1) : (((isset($context["countGaId"]) || array_key_exists("countGaId"$context) ? $context["countGaId"] : (function () { throw new RuntimeError('Variable "countGaId" does not exist.'83$this->source); })()) + 1)));
  290.                     // line 84
  291.                     echo "                    ";
  292.                 }
  293.                 // line 85
  294.                 echo "
  295.                     ";
  296.                 // line 86
  297.                 $context["countImages"] = ((isset($context["countImages"]) || array_key_exists("countImages"$context) ? $context["countImages"] : (function () { throw new RuntimeError('Variable "countImages" does not exist.'86$this->source); })()) + 1);
  298.                 // line 87
  299.                 echo "                ";
  300.                 ++$context['loop']['index0'];
  301.                 ++$context['loop']['index'];
  302.                 $context['loop']['first'] = false;
  303.                 if (isset($context['loop']['length'])) {
  304.                     --$context['loop']['revindex0'];
  305.                     --$context['loop']['revindex'];
  306.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  307.                 }
  308.             }
  309.             $_parent $context['_parent'];
  310.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
  311.             $context array_intersect_key($context$_parent) + $_parent;
  312.             // line 88
  313.             echo "                ";
  314.             if ((array_key_exists("images"$context) &&  !twig_test_empty((isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'88$this->source); })())))) {
  315.                 // line 89
  316.                 echo "                    ";
  317.                 if (((twig_length_filter($this->env, (isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'89$this->source); })())) == 3) || (twig_length_filter($this->env, (isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'89$this->source); })())) == 1))) {
  318.                     // line 90
  319.                     echo "                        ";
  320.                     $context["galId"] = 1;
  321.                     // line 91
  322.                     echo "                    ";
  323.                 } else {
  324.                     // line 92
  325.                     echo "                        ";
  326.                     $context["galId"] = 3;
  327.                     // line 93
  328.                     echo "                    ";
  329.                 }
  330.                 // line 94
  331.                 echo "                    ";
  332.                 echo twig_include($this->env$context, (("@ElementsDemiFrontend/Accommodation/includes/acco-gallery-row-type" $this->sandbox->ensureToStringAllowed((isset($context["galId"]) || array_key_exists("galId"$context) ? $context["galId"] : (function () { throw new RuntimeError('Variable "galId" does not exist.'94$this->source); })()), 94$this->source)) . ".html.twig"), ["images" =>                 // line 95
  333. (isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'95$this->source); })())]);
  334.                 // line 96
  335.                 echo "
  336.                 ";
  337.             }
  338.             // line 98
  339.             echo "
  340.             </div>
  341.     ";
  342.         }
  343.         // line 101
  344.         echo "    </div>
  345. </section>
  346. ";
  347.         
  348.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  349.         
  350.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  351.     }
  352.     /**
  353.      * @codeCoverageIgnore
  354.      */
  355.     public function getTemplateName()
  356.     {
  357.         return "@ElementsDemiFrontend/Accommodation/includes/acco-pictures.desktop.html.twig";
  358.     }
  359.     /**
  360.      * @codeCoverageIgnore
  361.      */
  362.     public function isTraitable()
  363.     {
  364.         return false;
  365.     }
  366.     /**
  367.      * @codeCoverageIgnore
  368.      */
  369.     public function getDebugInfo()
  370.     {
  371.         return array (  354 => 101,  349 => 98,  345 => 96,  343 => 95,  341 => 94,  338 => 93,  335 => 92,  332 => 91,  329 => 90,  326 => 89,  323 => 88,  309 => 87,  307 => 86,  304 => 85,  301 => 84,  298 => 83,  295 => 82,  293 => 81,  290 => 80,  288 => 79,  286 => 78,  283 => 77,  280 => 76,  277 => 75,  274 => 74,  271 => 73,  268 => 72,  265 => 71,  247 => 70,  244 => 69,  241 => 68,  238 => 67,  235 => 66,  232 => 65,  230 => 64,  218 => 63,  214 => 62,  211 => 61,  208 => 60,  205 => 59,  202 => 58,  199 => 57,  196 => 56,  194 => 55,  191 => 54,  188 => 53,  185 => 52,  182 => 51,  179 => 50,  177 => 49,  173 => 48,  170 => 47,  164 => 43,  160 => 41,  154 => 40,  148 => 37,  143 => 36,  140 => 35,  137 => 34,  133 => 33,  129 => 32,  125 => 30,  122 => 29,  119 => 28,  116 => 27,  113 => 26,  108 => 23,  102 => 22,  96 => 19,  91 => 18,  88 => 17,  85 => 16,  81 => 15,  77 => 14,  73 => 12,  70 => 11,  67 => 10,  64 => 9,  62 => 8,  56 => 6,  54 => 5,  51 => 4,  49 => 3,  47 => 2,  45 => 1,);
  372.     }
  373.     public function getSourceContext()
  374.     {
  375.         return new Source("{% set videoCount = videoCount|default(0) %}
  376. {% set panoCount = panoCount|default(0) %}
  377. {% set package = package is defined ? package : null %}
  378. <section class=\"mt-4\">
  379.     {% if videoCount > 0 or panoCount > 0 %}
  380.     <div data-track-content data-content-name=\"{{ package ? 'package-' : 'accommodation-' }}media-links\">
  381.         <div class=\"row\">
  382.             {% if videoCount > 0 %}
  383.                 {% set s = videoCount == 1 ? \"\" : \"s\" %}
  384.                 {% set headline = ('demi.detail.video' ~ s ~ '-gallery-button')|trans %}
  385.                 {% set headline = headline|replace({'[AMOUNT_IMAGES]': ''}) %}
  386.                 <div class=\"col-6\">
  387.                     <h2 class=\"mb-4 text-primary\">{{ headline }}</h2>
  388.                     {% for item in impressionLinks[\"video\"] %}
  389.                         {% set url = demi_parseUrl( item.getUrl()|escape('html') ) %}
  390.                         {%  if url['host'] is not empty %}
  391.                             <a href=\"{{ item.getUrl()|escape('html') }}\" class=\"btn btn-primary mr-2 mb-2\" target=\"_blank\">
  392.                                 <span class=\"btn__icon demi-icon demi-icon-play-circle mr-2\" aria-hidden=\"true\"></span>{{ item.getName() }}
  393.                             </a>
  394.                         {% endif %}
  395.                     {% endfor %}
  396.                 </div>
  397.             {% endif %}
  398.             {% if panoCount > 0 %}
  399.                 {% set s = panoCount == 1 ? \"\" : \"s\" %}
  400.                 {% set headline = ('demi.detail.panorama' ~ s ~ '-gallery-button')|trans  %}
  401.                 {% set headline = headline|replace({'[AMOUNT_IMAGES]': ''}) %}
  402.                 <div class=\"col-6\">
  403.                     <h2 class=\"mb-4 text-primary\">360° {{ headline }}</h2>
  404.                     {% for item in impressionLinks[\"pano\"] %}
  405.                         {% set url = demi_parseUrl( item.getUrl() ) %}
  406.                         {%  if url['host'] is not empty %}
  407.                         <a target=\"_blank\" href=\"{{ item.getUrl() }}\" class=\"btn btn-primary mr-2 mb-2\">
  408.                             <span class=\"btn__icon demi-icon demi-icon-play-circle mr-2\" aria-hidden=\"true\"></span>{{ item.getName() }}
  409.                         </a>
  410.                         {% endif %}
  411.                      {% endfor %}
  412.                 </div>
  413.             {% endif %}
  414.         </div>
  415.     </div>
  416.     <hr class=\"hr--border-gray my-5\">
  417.     {% endif %}
  418.     <div data-track-content data-content-name=\"{{ package ? 'package-' : 'accommodation-' }}gallery\">
  419.     {% if photoCount > 0 %}
  420.             {% set s = photoCount == 1 ? \"\" : \"s\" %}
  421.             {% set headline = ('demi.detail.image' ~ s ~ '-gallery-button')|trans %}
  422.             {% set headline = headline|replace({'[AMOUNT_IMAGES]': ''}) %}
  423.             {% set fullPathLighbox = document.getFullPath() %}
  424.             {% if fullPathLighbox != '' %}
  425.                 {% set lightboxTopBarUrl = pimcore_url({'path': document.getFullPath()|trim('/','right') },'demi_lightbox_topbar_content') %}
  426.                 {% if lightboxTopBarUrl matches '@^//.*@' %}
  427.                     {% set  lightboxTopBarUrl = lightboxTopBarUrl|replace({\"//\": \"/\"})%}
  428.                 {% endif %}
  429.             {% endif %}
  430.             <h2 class=\"mb-4 text-primary\">{{ headline }}</h2>
  431.             <div class=\"js-lightbox-group js-object-images__container\" {% if additionalService is not defined %}data-lightbox-topbar-content-url=\"{{ lightboxTopBarUrl }}{{ '?' in lightboxTopBarUrl ? '&' : '?' }}id={{ accoId }}{{ housePackageMasterId is defined ? '&pid=' ~ housePackageMasterId : '' }}\" data-lightbox-topbar-wrapper=\"#lightboxTopBar\"{% endif %}>
  432.                 {% set imageArray = [] %}
  433.                 {% set countGaId = 1 %}
  434.                 {% set countImages = 1 %}
  435.                 {% set imageAmount = [3,4,4] %}
  436.                 {% set ogimagecount = 0 %}
  437.                 {% set images = [] %}
  438.                 {% for image in imageList %}
  439.                     {% if ogimagecount < 5 %}
  440.                         {% do elements_opengraph().setImages(elements_opengraph().getImages|merge( [app.request.getHost() ~ image])) %}
  441.                         {% set  ogimagecount = ogimagecount+1 %}
  442.                     {% endif %}
  443.                     {% set images = images|merge({(countImages-1): image})  %}
  444.                     {% if countImages == imageAmount[countGaId-1] %}
  445.                         {% set galId = countGaId%4 %}
  446.                         {{ include(\"@ElementsDemiFrontend/Accommodation/includes/acco-gallery-row-type\" ~ galId ~ \".html.twig\",{
  447.                             'images': images
  448.                         }) }}
  449.                         {% set countImages=0 %}
  450.                         {% set images = [] %}
  451.                         {% set countGaId = countGaId == 3 ? 1 : countGaId+1 %}
  452.                     {% endif %}
  453.                     {% set countImages = countImages + 1 %}
  454.                 {% endfor %}
  455.                 {% if images is defined and images is not empty %}
  456.                     {% if images|length == 3 or images|length == 1 %}
  457.                         {% set galId = 1 %}
  458.                     {% else %}
  459.                         {% set galId = 3 %}
  460.                     {% endif %}
  461.                     {{ include(\"@ElementsDemiFrontend/Accommodation/includes/acco-gallery-row-type\" ~ galId ~ \".html.twig\",{
  462.                         'images': images
  463.                     }) }}
  464.                 {% endif %}
  465.             </div>
  466.     {% endif %}
  467.     </div>
  468. </section>
  469. ""@ElementsDemiFrontend/Accommodation/includes/acco-pictures.desktop.html.twig""/home/steiermark/www/src/Elements/Bundle/DemiFrontendBundle/Resources/views/Accommodation/includes/acco-pictures.desktop.html.twig");
  470.     }
  471.     
  472.     public function checkSecurity()
  473.     {
  474.         static $tags = array("set" => 1"if" => 5"for" => 15"do" => 72);
  475.         static $filters = array("default" => 1"trans" => 10"replace" => 11"escape" => 14"trim" => 56"merge" => 72"length" => 89);
  476.         static $functions = array("demi_parseUrl" => 16"pimcore_url" => 56"elements_opengraph" => 72"include" => 78);
  477.         try {
  478.             $this->sandbox->checkSecurity(
  479.                 ['set''if''for''do'],
  480.                 ['default''trans''replace''escape''trim''merge''length'],
  481.                 ['demi_parseUrl''pimcore_url''elements_opengraph''include']
  482.             );
  483.         } catch (SecurityError $e) {
  484.             $e->setSourceContext($this->source);
  485.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  486.                 $e->setTemplateLine($tags[$e->getTagName()]);
  487.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  488.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  489.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  490.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  491.             }
  492.             throw $e;
  493.         }
  494.     }
  495. }