var/cache/dev/twig/07/074be0e99febf94dd3aa9cbb8359c115.php line 218

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/Includes/teaser/room-teaser.desktop.html.twig */
  14. class __TwigTemplate_8f7e50bed95394ce0a6716bcd0f50f54 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/Includes/teaser/room-teaser.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/Includes/teaser/room-teaser.desktop.html.twig"));
  35.         // line 12
  36.         echo "
  37. ";
  38.         // line 13
  39.         if (( !array_key_exists("searchParam"$context) || twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["searchParam"]) || array_key_exists("searchParam"$context) ? $context["searchParam"] : (function () { throw new RuntimeError('Variable "searchParam" does not exist.'13$this->source); })()), "getDateFrom", [], "method"falsefalsetrue13)))) {
  40.             // line 14
  41.             echo "    ";
  42.             $context["fromDate"] = null;
  43.         } else {
  44.             // line 16
  45.             echo "    ";
  46.             $context["fromDate"] = $this->env->getFunction('demi_getSearchFrom')->getCallable()();
  47.         }
  48.         // line 18
  49.         echo "
  50. ";
  51.         // line 19
  52.         if (((is_iterable((isset($context["productData"]) || array_key_exists("productData"$context) ? $context["productData"] : (function () { throw new RuntimeError('Variable "productData" does not exist.'19$this->source); })())) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["productData"] ?? null), "roomRow", [], "any"falsetruetrue19), 0, [], "array"truetruetrue19)) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["productData"] ?? null), "products", [], "any"falsetruetrue19), 0, [], "array"truetruetrue19))) {
  53.             // line 20
  54.             echo "    ";
  55.             $context["possibleIndices"] = twig_get_array_keys_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["productData"]) || array_key_exists("productData"$context) ? $context["productData"] : (function () { throw new RuntimeError('Variable "productData" does not exist.'20$this->source); })()), "roomRow", [], "any"falsefalsetrue20), 20$this->source));
  56.             // line 21
  57.             echo "    ";
  58.             $context["i"] = twig_first($this->env$this->sandbox->ensureToStringAllowed((isset($context["possibleIndices"]) || array_key_exists("possibleIndices"$context) ? $context["possibleIndices"] : (function () { throw new RuntimeError('Variable "possibleIndices" does not exist.'21$this->source); })()), 21$this->source));
  59.             // line 22
  60.             echo "    ";
  61.             $context["roomRow"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["productData"]) || array_key_exists("productData"$context) ? $context["productData"] : (function () { throw new RuntimeError('Variable "productData" does not exist.'22$this->source); })()), "roomRow", [], "any"falsefalsetrue22), (isset($context["i"]) || array_key_exists("i"$context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.'22$this->source); })()), [], "array"falsefalsetrue22), "getRowObject", [], "method"falsefalsetrue22);
  62.             // line 23
  63.             echo "    ";
  64.             $context["product"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["productData"]) || array_key_exists("productData"$context) ? $context["productData"] : (function () { throw new RuntimeError('Variable "productData" does not exist.'23$this->source); })()), "products", [], "any"falsefalsetrue23), (isset($context["i"]) || array_key_exists("i"$context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.'23$this->source); })()), [], "array"falsefalsetrue23);
  65.             // line 24
  66.             echo "    ";
  67.             $context["accommodationProduct"] = Pimcore\Model\DataObject::getById($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'24$this->source); })()), "getProductId", [], "method"falsefalsetrue24), 24$this->source));
  68.             // line 25
  69.             echo "
  70.     ";
  71.             // line 26
  72.             if (((isset($context["accommodationProduct"]) || array_key_exists("accommodationProduct"$context) ? $context["accommodationProduct"] : (function () { throw new RuntimeError('Variable "accommodationProduct" does not exist.'26$this->source); })()) && twig_get_attribute($this->env$this->source, (isset($context["accommodationProduct"]) || array_key_exists("accommodationProduct"$context) ? $context["accommodationProduct"] : (function () { throw new RuntimeError('Variable "accommodationProduct" does not exist.'26$this->source); })()), "isPublished", [], "method"falsefalsetrue26))) {
  73.                 // line 27
  74.                 echo "        <li>
  75.             ";
  76.                 // line 28
  77.                 if ((isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'28$this->source); })())) {
  78.                     // line 29
  79.                     echo "                ";
  80.                     if ((isset($context["roomRow"]) || array_key_exists("roomRow"$context) ? $context["roomRow"] : (function () { throw new RuntimeError('Variable "roomRow" does not exist.'29$this->source); })())) {
  81.                         // line 30
  82.                         echo "                    ";
  83.                         $context["priceData"] = twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'30$this->source); })()), "getPriceData", [], "method"falsefalsetrue30);
  84.                         // line 31
  85.                         echo "                    ";
  86.                         $context["price"] = twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'31$this->source); })()), "getPrice", [], "method"falsefalsetrue31);
  87.                         // line 32
  88.                         echo "                    ";
  89.                         $context["showVacancy"] = true;
  90.                         // line 33
  91.                         echo "                    ";
  92.                         $context["showSelection"] = true;
  93.                         // line 34
  94.                         echo "                    ";
  95.                         $context["vacancyCount"] = twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'34$this->source); })()), "getUnits", [], "method"falsefalsetrue34);
  96.                         // line 35
  97.                         echo "                ";
  98.                     } else {
  99.                         // line 36
  100.                         echo "                    ";
  101.                         $context["priceData"] = null;
  102.                         // line 37
  103.                         echo "                    ";
  104.                         $context["price"] = twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'37$this->source); })()), "getBasePrice", [], "method"falsefalsetrue37);
  105.                         // line 38
  106.                         echo "                    ";
  107.                         $context["showVacancy"] = false;
  108.                         // line 39
  109.                         echo "                    ";
  110.                         $context["showSelection"] = false;
  111.                         // line 40
  112.                         echo "                    ";
  113.                         $context["vacancyCount"] = 0;
  114.                         // line 41
  115.                         echo "                    ";
  116.                         $context["priceInfo"] = (((twig_get_attribute($this->env$this->source, ($context["product"] ?? null), "getPriceInfo", [], "method"truetruetrue41) &&  !(null === twig_get_attribute($this->env$this->source, ($context["product"] ?? null), "getPriceInfo", [], "method"falsefalsetrue41)))) ? (twig_get_attribute($this->env$this->source, ($context["product"] ?? null), "getPriceInfo", [], "method"falsefalsetrue41)) : (null));
  117.                         // line 42
  118.                         echo "                    ";
  119.                         $context["priceInfoText"] = (( !(null === (isset($context["priceInfo"]) || array_key_exists("priceInfo"$context) ? $context["priceInfo"] : (function () { throw new RuntimeError('Variable "priceInfo" does not exist.'42$this->source); })()))) ? (twig_include($this->env$context"@ElementsDemiFrontend/Includes/priceInfoStr.html.twig", ["type" => (((twig_get_attribute($this->env$this->source, ($context["priceInfo"] ?? null), "type", [], "any"truetruetrue42) &&  !(null === twig_get_attribute($this->env$this->source, ($context["priceInfo"] ?? null), "type", [], "any"falsefalsetrue42)))) ? (twig_get_attribute($this->env$this->source, ($context["priceInfo"] ?? null), "type", [], "any"falsefalsetrue42)) : (null)), "nights" => (((twig_get_attribute($this->env$this->source, ($context["priceInfo"] ?? null), "nights", [], "any"truetruetrue42) &&  !(null === twig_get_attribute($this->env$this->source, ($context["priceInfo"] ?? null), "nights", [], "any"falsefalsetrue42)))) ? (twig_get_attribute($this->env$this->source, ($context["priceInfo"] ?? null), "nights", [], "any"falsefalsetrue42)) : (null))])) : (""));
  120.                         // line 43
  121.                         echo "                ";
  122.                     }
  123.                     // line 44
  124.                     echo "            ";
  125.                 }
  126.                 // line 45
  127.                 echo "
  128.             ";
  129.                 // line 46
  130.                 $context["images"] = (((isset($context["accommodationProduct"]) || array_key_exists("accommodationProduct"$context) ? $context["accommodationProduct"] : (function () { throw new RuntimeError('Variable "accommodationProduct" does not exist.'46$this->source); })())) ? ($this->env->getFunction('demi_getRoomPictures')->getCallable()($this->sandbox->ensureToStringAllowed((isset($context["accommodationProduct"]) || array_key_exists("accommodationProduct"$context) ? $context["accommodationProduct"] : (function () { throw new RuntimeError('Variable "accommodationProduct" does not exist.'46$this->source); })()), 46$this->source), $this->sandbox->ensureToStringAllowed((isset($context["fromDate"]) || array_key_exists("fromDate"$context) ? $context["fromDate"] : (function () { throw new RuntimeError('Variable "fromDate" does not exist.'46$this->source); })()), 46$this->source))) : ([]));
  131.                 // line 47
  132.                 echo "            ";
  133.                 $context["moreRoomRows"] = true;
  134.                 // line 48
  135.                 echo "
  136.             <div class=\"js-room-selection__room my-3\"
  137.                  data-availability-reference-id=\"";
  138.                 // line 50
  139.                 echo twig_escape_filter($this->env, (((twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'50$this->source); })()), "getAvailabilityReference", [], "method"falsefalsetrue50) === "Service")) ? (twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'50$this->source); })()), "getServiceId", [], "method"falsefalsetrue50)) : (twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'50$this->source); })()), "getProductId", [], "method"falsefalsetrue50))), "html"nulltrue);
  140.                 echo "\"
  141.                  data-room-id=\"";
  142.                 // line 51
  143.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'51$this->source); })()), "getProductId", [], "method"falsefalsetrue51), 51$this->source), "html"nulltrue);
  144.                 echo "\"
  145.                  data-tracking-variant=\"";
  146.                 // line 52
  147.                 echo $this->env->getFunction('demi_impressionVariant')->getCallable()((((isset($context["accommodationProduct"]) || array_key_exists("accommodationProduct"$context) ? $context["accommodationProduct"] : (function () { throw new RuntimeError('Variable "accommodationProduct" does not exist.'52$this->source); })())) ?: ((isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'52$this->source); })()))), $this->sandbox->ensureToStringAllowed((isset($context["tvbPackage"]) || array_key_exists("tvbPackage"$context) ? $context["tvbPackage"] : (function () { throw new RuntimeError('Variable "tvbPackage" does not exist.'52$this->source); })()), 52$this->source));
  148.                 echo "\"
  149.                  data-tracking-variant-id=\"";
  150.                 // line 53
  151.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'53$this->source); })()), "getProductId", [], "method"falsefalsetrue53), 53$this->source), "html"nulltrue);
  152.                 echo "\"
  153.                  data-settler-code=\"";
  154.                 // line 54
  155.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["settlerCode"]) || array_key_exists("settlerCode"$context) ? $context["settlerCode"] : (function () { throw new RuntimeError('Variable "settlerCode" does not exist.'54$this->source); })()), 54$this->source), "html"nulltrue);
  156.                 echo "\"
  157.                  data-booking-type=\"";
  158.                 // line 55
  159.                 echo ((twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'55$this->source); })()), "getBookable", [], "method"falsefalsetrue55)) ? ("bookable") : ("onrequest"));
  160.                 echo "\">
  161.                 <div class=\"card\">
  162.                     ";
  163.                 // line 59
  164.                 if (( !(isset($context["availabilityIsChecked"]) || array_key_exists("availabilityIsChecked"$context) ? $context["availabilityIsChecked"] : (function () { throw new RuntimeError('Variable "availabilityIsChecked" does not exist.'59$this->source); })()) ||  !(isset($context["hasSingleRoomRow"]) || array_key_exists("hasSingleRoomRow"$context) ? $context["hasSingleRoomRow"] : (function () { throw new RuntimeError('Variable "hasSingleRoomRow" does not exist.'59$this->source); })()))) {
  165.                     // line 60
  166.                     echo "                        ";
  167.                     $context["firstPossibleIndex"] = twig_first($this->envtwig_get_array_keys_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["productData"]) || array_key_exists("productData"$context) ? $context["productData"] : (function () { throw new RuntimeError('Variable "productData" does not exist.'60$this->source); })()), "products", [], "any"falsefalsetrue60), 60$this->source)));
  168.                     // line 61
  169.                     echo "                        ";
  170.                     $context["product"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["productData"]) || array_key_exists("productData"$context) ? $context["productData"] : (function () { throw new RuntimeError('Variable "productData" does not exist.'61$this->source); })()), "products", [], "any"falsefalsetrue61), (isset($context["firstPossibleIndex"]) || array_key_exists("firstPossibleIndex"$context) ? $context["firstPossibleIndex"] : (function () { throw new RuntimeError('Variable "firstPossibleIndex" does not exist.'61$this->source); })()), [], "array"falsefalsetrue61);
  171.                     // line 62
  172.                     echo "                        ";
  173.                     echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/teaser/room-teaser-content.desktop.html.twig", ["count" =>                     // line 63
  174. (isset($context["firstPossibleIndex"]) || array_key_exists("firstPossibleIndex"$context) ? $context["firstPossibleIndex"] : (function () { throw new RuntimeError('Variable "firstPossibleIndex" does not exist.'63$this->source); })()), "product" =>                     // line 64
  175. (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'64$this->source); })()), "productData" =>                     // line 65
  176. (isset($context["productData"]) || array_key_exists("productData"$context) ? $context["productData"] : (function () { throw new RuntimeError('Variable "productData" does not exist.'65$this->source); })()), "images" =>                     // line 66
  177. (isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'66$this->source); })()), "tableOnSide" => true"hasSingleRoomRow" => true"availabilityIsChecked" =>                     // line 69
  178. (isset($context["availabilityIsChecked"]) || array_key_exists("availabilityIsChecked"$context) ? $context["availabilityIsChecked"] : (function () { throw new RuntimeError('Variable "availabilityIsChecked" does not exist.'69$this->source); })()), "priceData" =>                     // line 70
  179. (isset($context["priceData"]) || array_key_exists("priceData"$context) ? $context["priceData"] : (function () { throw new RuntimeError('Variable "priceData" does not exist.'70$this->source); })()), "priceInfoText" =>                     // line 71
  180. (isset($context["priceInfoText"]) || array_key_exists("priceInfoText"$context) ? $context["priceInfoText"] : (function () { throw new RuntimeError('Variable "priceInfoText" does not exist.'71$this->source); })()), "tvbPackage" =>                     // line 72
  181. (isset($context["tvbPackage"]) || array_key_exists("tvbPackage"$context) ? $context["tvbPackage"] : (function () { throw new RuntimeError('Variable "tvbPackage" does not exist.'72$this->source); })()), "dateFrom" =>                     // line 73
  182. (isset($context["fromDate"]) || array_key_exists("fromDate"$context) ? $context["fromDate"] : (function () { throw new RuntimeError('Variable "fromDate" does not exist.'73$this->source); })()), "moreRoomRows" => false]);
  183.                     // line 75
  184.                     echo "
  185.                     ";
  186.                 }
  187.                 // line 77
  188.                 echo "
  189.                     <div id=\"room-row-collapse-parent-";
  190.                 // line 78
  191.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'78$this->source); })()), "getProductId", [], "method"falsefalsetrue78), 78$this->source), "html"nulltrue);
  192.                 echo "\">
  193.                         <div class=\"panel\">
  194.                             ";
  195.                 // line 80
  196.                 if (( !(isset($context["availabilityIsChecked"]) || array_key_exists("availabilityIsChecked"$context) ? $context["availabilityIsChecked"] : (function () { throw new RuntimeError('Variable "availabilityIsChecked" does not exist.'80$this->source); })()) ||  !(isset($context["hasSingleRoomRow"]) || array_key_exists("hasSingleRoomRow"$context) ? $context["hasSingleRoomRow"] : (function () { throw new RuntimeError('Variable "hasSingleRoomRow" does not exist.'80$this->source); })()))) {
  197.                     // line 81
  198.                     echo "                                    ";
  199.                     echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/teaser/room-details.html.twig", ["id" => twig_get_attribute($this->env$this->source,                     // line 82
  200. (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'82$this->source); })()), "getProductId", [], "method"falsefalsetrue82), "accommodationProduct" =>                     // line 83
  201. (isset($context["accommodationProduct"]) || array_key_exists("accommodationProduct"$context) ? $context["accommodationProduct"] : (function () { throw new RuntimeError('Variable "accommodationProduct" does not exist.'83$this->source); })()), "images" =>                     // line 84
  202. (isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'84$this->source); })()), "availabilityIsChecked" =>                     // line 85
  203. (isset($context["availabilityIsChecked"]) || array_key_exists("availabilityIsChecked"$context) ? $context["availabilityIsChecked"] : (function () { throw new RuntimeError('Variable "availabilityIsChecked" does not exist.'85$this->source); })()), "moreRoomRows" => (( !                    // line 86
  204. (isset($context["hasSingleRoomRow"]) || array_key_exists("hasSingleRoomRow"$context) ? $context["hasSingleRoomRow"] : (function () { throw new RuntimeError('Variable "hasSingleRoomRow" does not exist.'86$this->source); })())) ? ((isset($context["moreRoomRows"]) || array_key_exists("moreRoomRows"$context) ? $context["moreRoomRows"] : (function () { throw new RuntimeError('Variable "moreRoomRows" does not exist.'86$this->source); })())) : ("")), "accommodation" =>                     // line 87
  205. (isset($context["accommodation"]) || array_key_exists("accommodation"$context) ? $context["accommodation"] : (function () { throw new RuntimeError('Variable "accommodation" does not exist.'87$this->source); })()), "dateFrom" =>                     // line 88
  206. (isset($context["fromDate"]) || array_key_exists("fromDate"$context) ? $context["fromDate"] : (function () { throw new RuntimeError('Variable "fromDate" does not exist.'88$this->source); })()), "pakcage" =>                     // line 89
  207. (isset($context["tvbPackage"]) || array_key_exists("tvbPackage"$context) ? $context["tvbPackage"] : (function () { throw new RuntimeError('Variable "tvbPackage" does not exist.'89$this->source); })())]);
  208.                     // line 90
  209.                     echo "
  210.                             ";
  211.                 }
  212.                 // line 92
  213.                 echo "
  214.                             ";
  215.                 // line 93
  216.                 if ((isset($context["availabilityIsChecked"]) || array_key_exists("availabilityIsChecked"$context) ? $context["availabilityIsChecked"] : (function () { throw new RuntimeError('Variable "availabilityIsChecked" does not exist.'93$this->source); })())) {
  217.                     // line 94
  218.                     echo "
  219.                                 ";
  220.                     // line 95
  221.                     $context['_parent'] = $context;
  222.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["productData"]) || array_key_exists("productData"$context) ? $context["productData"] : (function () { throw new RuntimeError('Variable "productData" does not exist.'95$this->source); })()), "products", [], "any"falsefalsetrue95));
  223.                     $context['loop'] = [
  224.                       'parent' => $context['_parent'],
  225.                       'index0' => 0,
  226.                       'index'  => 1,
  227.                       'first'  => true,
  228.                     ];
  229.                     if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  230.                         $length count($context['_seq']);
  231.                         $context['loop']['revindex0'] = $length 1;
  232.                         $context['loop']['revindex'] = $length;
  233.                         $context['loop']['length'] = $length;
  234.                         $context['loop']['last'] = === $length;
  235.                     }
  236.                     foreach ($context['_seq'] as $context["productIndex"] => $context["product"]) {
  237.                         // line 96
  238.                         echo "
  239.                                     ";
  240.                         // line 97
  241.                         echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/teaser/room-teaser-content.desktop.html.twig", ["count" =>                         // line 98
  242. $context["productIndex"], "product" =>                         // line 99
  243. $context["product"], "productData" =>                         // line 100
  244. (isset($context["productData"]) || array_key_exists("productData"$context) ? $context["productData"] : (function () { throw new RuntimeError('Variable "productData" does not exist.'100$this->source); })()), "images" =>                         // line 101
  245. (isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'101$this->source); })()), "tableOnSide" => false"hasSingleRoomRow" =>                         // line 103
  246. (isset($context["hasSingleRoomRow"]) || array_key_exists("hasSingleRoomRow"$context) ? $context["hasSingleRoomRow"] : (function () { throw new RuntimeError('Variable "hasSingleRoomRow" does not exist.'103$this->source); })()), "availabilityIsChecked" =>                         // line 104
  247. (isset($context["availabilityIsChecked"]) || array_key_exists("availabilityIsChecked"$context) ? $context["availabilityIsChecked"] : (function () { throw new RuntimeError('Variable "availabilityIsChecked" does not exist.'104$this->source); })()), "moreRoomRows" => (( !                        // line 105
  248. (isset($context["hasSingleRoomRow"]) || array_key_exists("hasSingleRoomRow"$context) ? $context["hasSingleRoomRow"] : (function () { throw new RuntimeError('Variable "hasSingleRoomRow" does not exist.'105$this->source); })())) ? ((isset($context["moreRoomRows"]) || array_key_exists("moreRoomRows"$context) ? $context["moreRoomRows"] : (function () { throw new RuntimeError('Variable "moreRoomRows" does not exist.'105$this->source); })())) : (null)), "tvbPackage" =>                         // line 106
  249. (isset($context["tvbPackage"]) || array_key_exists("tvbPackage"$context) ? $context["tvbPackage"] : (function () { throw new RuntimeError('Variable "tvbPackage" does not exist.'106$this->source); })()), "dateFrom" =>                         // line 107
  250. (isset($context["fromDate"]) || array_key_exists("fromDate"$context) ? $context["fromDate"] : (function () { throw new RuntimeError('Variable "fromDate" does not exist.'107$this->source); })())]);
  251.                         // line 108
  252.                         echo "
  253.                                     ";
  254.                         // line 110
  255.                         if ((isset($context["hasSingleRoomRow"]) || array_key_exists("hasSingleRoomRow"$context) ? $context["hasSingleRoomRow"] : (function () { throw new RuntimeError('Variable "hasSingleRoomRow" does not exist.'110$this->source); })())) {
  256.                             // line 111
  257.                             echo "
  258.                                         ";
  259.                             // line 112
  260.                             echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/teaser/room-details.html.twig", ["id" => twig_get_attribute($this->env$this->source,                             // line 113
  261. $context["product"], "getProductId", [], "method"falsefalsetrue113), "accommodationProduct" =>                             // line 114
  262. (isset($context["accommodationProduct"]) || array_key_exists("accommodationProduct"$context) ? $context["accommodationProduct"] : (function () { throw new RuntimeError('Variable "accommodationProduct" does not exist.'114$this->source); })()), "images" =>                             // line 115
  263. (isset($context["images"]) || array_key_exists("images"$context) ? $context["images"] : (function () { throw new RuntimeError('Variable "images" does not exist.'115$this->source); })()), "availabilityIsChecked" =>                             // line 116
  264. (isset($context["availabilityIsChecked"]) || array_key_exists("availabilityIsChecked"$context) ? $context["availabilityIsChecked"] : (function () { throw new RuntimeError('Variable "availabilityIsChecked" does not exist.'116$this->source); })()), "moreRoomRows" => null"dateFrom" =>                             // line 118
  265. (isset($context["fromDate"]) || array_key_exists("fromDate"$context) ? $context["fromDate"] : (function () { throw new RuntimeError('Variable "fromDate" does not exist.'118$this->source); })()), "package" =>                             // line 119
  266. (isset($context["tvbPackage"]) || array_key_exists("tvbPackage"$context) ? $context["tvbPackage"] : (function () { throw new RuntimeError('Variable "tvbPackage" does not exist.'119$this->source); })())]);
  267.                             // line 120
  268.                             echo "
  269.                                     ";
  270.                         }
  271.                         // line 122
  272.                         echo "                                ";
  273.                         ++$context['loop']['index0'];
  274.                         ++$context['loop']['index'];
  275.                         $context['loop']['first'] = false;
  276.                         if (isset($context['loop']['length'])) {
  277.                             --$context['loop']['revindex0'];
  278.                             --$context['loop']['revindex'];
  279.                             $context['loop']['last'] = === $context['loop']['revindex0'];
  280.                         }
  281.                     }
  282.                     $_parent $context['_parent'];
  283.                     unset($context['_seq'], $context['_iterated'], $context['productIndex'], $context['product'], $context['_parent'], $context['loop']);
  284.                     $context array_intersect_key($context$_parent) + $_parent;
  285.                     // line 123
  286.                     echo "                            ";
  287.                 } elseif ((isset($context["showAvailablityCalendar"]) || array_key_exists("showAvailablityCalendar"$context) ? $context["showAvailablityCalendar"] : (function () { throw new RuntimeError('Variable "showAvailablityCalendar" does not exist.'123$this->source); })())) {
  288.                     // line 124
  289.                     echo "                                ";
  290.                     echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/teaser/room-availabilities.html.twig", ["product" =>                     // line 125
  291. (isset($context["accommodationProduct"]) || array_key_exists("accommodationProduct"$context) ? $context["accommodationProduct"] : (function () { throw new RuntimeError('Variable "accommodationProduct" does not exist.'125$this->source); })()), "accommodation" =>                     // line 126
  292. (isset($context["accommodation"]) || array_key_exists("accommodation"$context) ? $context["accommodation"] : (function () { throw new RuntimeError('Variable "accommodation" does not exist.'126$this->source); })())]);
  293.                     // line 127
  294.                     echo "
  295.                             ";
  296.                 }
  297.                 // line 129
  298.                 echo "                        </div>
  299.                     </div>
  300.                 </div>
  301.             </div>
  302.         </li>
  303.     ";
  304.             }
  305.         }
  306.         
  307.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  308.         
  309.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  310.     }
  311.     /**
  312.      * @codeCoverageIgnore
  313.      */
  314.     public function getTemplateName()
  315.     {
  316.         return "@ElementsDemiFrontend/Includes/teaser/room-teaser.desktop.html.twig";
  317.     }
  318.     /**
  319.      * @codeCoverageIgnore
  320.      */
  321.     public function isTraitable()
  322.     {
  323.         return false;
  324.     }
  325.     /**
  326.      * @codeCoverageIgnore
  327.      */
  328.     public function getDebugInfo()
  329.     {
  330.         return array (  310 => 129,  306 => 127,  304 => 126,  303 => 125,  301 => 124,  298 => 123,  284 => 122,  280 => 120,  278 => 119,  277 => 118,  276 => 116,  275 => 115,  274 => 114,  273 => 113,  272 => 112,  269 => 111,  267 => 110,  263 => 108,  261 => 107,  260 => 106,  259 => 105,  258 => 104,  257 => 103,  256 => 101,  255 => 100,  254 => 99,  253 => 98,  252 => 97,  249 => 96,  232 => 95,  229 => 94,  227 => 93,  224 => 92,  220 => 90,  218 => 89,  217 => 88,  216 => 87,  215 => 86,  214 => 85,  213 => 84,  212 => 83,  211 => 82,  209 => 81,  207 => 80,  202 => 78,  199 => 77,  195 => 75,  193 => 73,  192 => 72,  191 => 71,  190 => 70,  189 => 69,  188 => 66,  187 => 65,  186 => 64,  185 => 63,  183 => 62,  180 => 61,  177 => 60,  175 => 59,  168 => 55,  164 => 54,  160 => 53,  156 => 52,  152 => 51,  148 => 50,  144 => 48,  141 => 47,  139 => 46,  136 => 45,  133 => 44,  130 => 43,  127 => 42,  124 => 41,  121 => 40,  118 => 39,  115 => 38,  112 => 37,  109 => 36,  106 => 35,  103 => 34,  100 => 33,  97 => 32,  94 => 31,  91 => 30,  88 => 29,  86 => 28,  83 => 27,  81 => 26,  78 => 25,  75 => 24,  72 => 23,  69 => 22,  66 => 21,  63 => 20,  61 => 19,  58 => 18,  54 => 16,  50 => 14,  48 => 13,  45 => 12,);
  331.     }
  332.     public function getSourceContext()
  333.     {
  334.         return new Source("{#
  335. /**
  336.  * @var \\\\Pimcore\\\\Templating\\\\GlobalVariables app
  337.  * #
  338.  * @var productData array
  339.  * @var accommodation \\\\Elements\\\\Demi\\\\Model\\\\AccommodationServiceProvider
  340.  * @var settlerCode string
  341.  * @var bookOnRequest bool
  342.  * @var availabilityIsChecked bool
  343.  * @var hasSingleRoomRow bool
  344.  */ #}
  345. {% if searchParam is not defined or searchParam.getDateFrom() is empty %}
  346.     {% set fromDate = null %}
  347. {% else %}
  348.     {% set fromDate = demi_getSearchFrom() %}
  349. {% endif %}
  350. {% if productData is iterable and productData.roomRow[0] is defined and productData.products[0] is defined%}
  351.     {% set possibleIndices = productData.roomRow | keys %}
  352.     {% set i = possibleIndices | first %}
  353.     {% set roomRow = productData.roomRow[i].getRowObject() %}
  354.     {% set product = productData.products[i] %}
  355.     {% set accommodationProduct = pimcore_object(product.getProductId()) %}
  356.     {% if accommodationProduct and accommodationProduct.isPublished() %}
  357.         <li>
  358.             {% if product %}
  359.                 {% if roomRow %}
  360.                     {% set priceData = product.getPriceData() %}
  361.                     {% set price = product.getPrice() %}
  362.                     {% set showVacancy = true %}
  363.                     {% set showSelection = true %}
  364.                     {% set vacancyCount = product.getUnits() %}
  365.                 {% else %}
  366.                     {% set priceData = null %}
  367.                     {% set price = product.getBasePrice() %}
  368.                     {% set showVacancy = false %}
  369.                     {% set showSelection = false %}
  370.                     {% set vacancyCount = 0 %}
  371.                     {% set priceInfo = product.getPriceInfo() ?? null %}
  372.                     {% set priceInfoText = priceInfo is not null ? include('@ElementsDemiFrontend/Includes/priceInfoStr.html.twig', {'type' : priceInfo.type ?? null, 'nights' : priceInfo.nights ?? null}) : '' %}
  373.                 {% endif %}
  374.             {% endif %}
  375.             {% set images = accommodationProduct ? demi_getRoomPictures(accommodationProduct,fromDate) : [] %}
  376.             {% set moreRoomRows = true %}
  377.             <div class=\"js-room-selection__room my-3\"
  378.                  data-availability-reference-id=\"{{ product.getAvailabilityReference() is same as \"Service\" ? product.getServiceId() : product.getProductId() }}\"
  379.                  data-room-id=\"{{ product.getProductId() }}\"
  380.                  data-tracking-variant=\"{{ demi_impressionVariant(accommodationProduct ?: product, tvbPackage) }}\"
  381.                  data-tracking-variant-id=\"{{ product.getProductId() }}\"
  382.                  data-settler-code=\"{{ settlerCode }}\"
  383.                  data-booking-type=\"{{ product.getBookable() ? 'bookable' : 'onrequest' }}\">
  384.                 <div class=\"card\">
  385.                     {% if not availabilityIsChecked or not hasSingleRoomRow %}
  386.                         {% set firstPossibleIndex = productData.products | keys | first%}
  387.                         {% set product = productData.products[firstPossibleIndex] %}
  388.                         {{ include(\"@ElementsDemiFrontend/Includes/teaser/room-teaser-content.desktop.html.twig\", {
  389.                             \"count\" : firstPossibleIndex,
  390.                             \"product\" : product,
  391.                             \"productData\" : productData,
  392.                             \"images\" : images,
  393.                             \"tableOnSide\" : true,
  394.                             \"hasSingleRoomRow\" : true,
  395.                             \"availabilityIsChecked\" : availabilityIsChecked,
  396.                             \"priceData\" : priceData,
  397.                             \"priceInfoText\" : priceInfoText,
  398.                             'tvbPackage' : tvbPackage,
  399.                             'dateFrom' : fromDate,
  400.                             'moreRoomRows' : false
  401.                         }) }}
  402.                     {% endif %}
  403.                     <div id=\"room-row-collapse-parent-{{ product.getProductId() }}\">
  404.                         <div class=\"panel\">
  405.                             {% if not availabilityIsChecked or not hasSingleRoomRow %}
  406.                                     {{ include(\"@ElementsDemiFrontend/Includes/teaser/room-details.html.twig\", {
  407.                                         \"id\" : product.getProductId(),
  408.                                         \"accommodationProduct\" : accommodationProduct,
  409.                                         \"images\" : images,
  410.                                         \"availabilityIsChecked\" : availabilityIsChecked,
  411.                                         \"moreRoomRows\" : not hasSingleRoomRow ? moreRoomRows : '',
  412.                                         \"accommodation\" : accommodation,
  413.                                         \"dateFrom\" : fromDate,
  414.                                         \"pakcage\" : tvbPackage
  415.                                     }) }}
  416.                             {% endif %}
  417.                             {% if availabilityIsChecked %}
  418.                                 {% for productIndex, product in productData.products %}
  419.                                     {{ include(\"@ElementsDemiFrontend/Includes/teaser/room-teaser-content.desktop.html.twig\", {
  420.                                         \"count\" : productIndex,
  421.                                         \"product\" : product,
  422.                                         \"productData\" : productData,
  423.                                         \"images\" : images,
  424.                                         \"tableOnSide\" : false,
  425.                                         \"hasSingleRoomRow\" : hasSingleRoomRow,
  426.                                         \"availabilityIsChecked\" : availabilityIsChecked,
  427.                                         \"moreRoomRows\" : not hasSingleRoomRow ? moreRoomRows : null,
  428.                                         'tvbPackage' : tvbPackage,
  429.                                         'dateFrom' : fromDate,
  430.                                     }) }}
  431.                                     {% if hasSingleRoomRow %}
  432.                                         {{ include(\"@ElementsDemiFrontend/Includes/teaser/room-details.html.twig\", {
  433.                                             'id' : product.getProductId(),
  434.                                             \"accommodationProduct\" : accommodationProduct,
  435.                                             \"images\" : images,
  436.                                             \"availabilityIsChecked\" : availabilityIsChecked,
  437.                                             \"moreRoomRows\" : null,
  438.                                             \"dateFrom\" : fromDate,
  439.                                             \"package\" : tvbPackage
  440.                                         }) }}
  441.                                     {% endif %}
  442.                                 {% endfor %}
  443.                             {% elseif showAvailablityCalendar %}
  444.                                 {{ include(\"@ElementsDemiFrontend/Includes/teaser/room-availabilities.html.twig\", {
  445.                                     'product' : accommodationProduct,
  446.                                     \"accommodation\" : accommodation
  447.                                 }) }}
  448.                             {% endif %}
  449.                         </div>
  450.                     </div>
  451.                 </div>
  452.             </div>
  453.         </li>
  454.     {% endif %}
  455. {% endif %}
  456. ""@ElementsDemiFrontend/Includes/teaser/room-teaser.desktop.html.twig""/home/steiermark/www/src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/teaser/room-teaser.desktop.html.twig");
  457.     }
  458.     
  459.     public function checkSecurity()
  460.     {
  461.         static $tags = array("if" => 13"set" => 14"for" => 95);
  462.         static $filters = array("keys" => 20"first" => 21"escape" => 50);
  463.         static $functions = array("demi_getSearchFrom" => 16"pimcore_object" => 24"include" => 42"demi_getRoomPictures" => 46"demi_impressionVariant" => 52);
  464.         try {
  465.             $this->sandbox->checkSecurity(
  466.                 ['if''set''for'],
  467.                 ['keys''first''escape'],
  468.                 ['demi_getSearchFrom''pimcore_object''include''demi_getRoomPictures''demi_impressionVariant']
  469.             );
  470.         } catch (SecurityError $e) {
  471.             $e->setSourceContext($this->source);
  472.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  473.                 $e->setTemplateLine($tags[$e->getTagName()]);
  474.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  475.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  476.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  477.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  478.             }
  479.             throw $e;
  480.         }
  481.     }
  482. }