<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @ElementsDemiFrontend/Includes/teaser/room-teaser.desktop.html.twig */
class __TwigTemplate_8f7e50bed95394ce0a6716bcd0f50f54 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ElementsDemiFrontend/Includes/teaser/room-teaser.desktop.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ElementsDemiFrontend/Includes/teaser/room-teaser.desktop.html.twig"));
// line 12
echo "
";
// line 13
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", false, false, true, 13)))) {
// line 14
echo " ";
$context["fromDate"] = null;
} else {
// line 16
echo " ";
$context["fromDate"] = $this->env->getFunction('demi_getSearchFrom')->getCallable()();
}
// line 18
echo "
";
// line 19
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->source, twig_get_attribute($this->env, $this->source, ($context["productData"] ?? null), "roomRow", [], "any", false, true, true, 19), 0, [], "array", true, true, true, 19)) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["productData"] ?? null), "products", [], "any", false, true, true, 19), 0, [], "array", true, true, true, 19))) {
// line 20
echo " ";
$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", false, false, true, 20), 20, $this->source));
// line 21
echo " ";
$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));
// line 22
echo " ";
$context["roomRow"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 22, $this->source); })()), "roomRow", [], "any", false, false, true, 22), (isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 22, $this->source); })()), [], "array", false, false, true, 22), "getRowObject", [], "method", false, false, true, 22);
// line 23
echo " ";
$context["product"] = twig_get_attribute($this->env, $this->source, 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.', 23, $this->source); })()), "products", [], "any", false, false, true, 23), (isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 23, $this->source); })()), [], "array", false, false, true, 23);
// line 24
echo " ";
$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", false, false, true, 24), 24, $this->source));
// line 25
echo "
";
// line 26
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", false, false, true, 26))) {
// line 27
echo " <li>
";
// line 28
if ((isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 28, $this->source); })())) {
// line 29
echo " ";
if ((isset($context["roomRow"]) || array_key_exists("roomRow", $context) ? $context["roomRow"] : (function () { throw new RuntimeError('Variable "roomRow" does not exist.', 29, $this->source); })())) {
// line 30
echo " ";
$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", false, false, true, 30);
// line 31
echo " ";
$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", false, false, true, 31);
// line 32
echo " ";
$context["showVacancy"] = true;
// line 33
echo " ";
$context["showSelection"] = true;
// line 34
echo " ";
$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", false, false, true, 34);
// line 35
echo " ";
} else {
// line 36
echo " ";
$context["priceData"] = null;
// line 37
echo " ";
$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", false, false, true, 37);
// line 38
echo " ";
$context["showVacancy"] = false;
// line 39
echo " ";
$context["showSelection"] = false;
// line 40
echo " ";
$context["vacancyCount"] = 0;
// line 41
echo " ";
$context["priceInfo"] = (((twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "getPriceInfo", [], "method", true, true, true, 41) && !(null === twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "getPriceInfo", [], "method", false, false, true, 41)))) ? (twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "getPriceInfo", [], "method", false, false, true, 41)) : (null));
// line 42
echo " ";
$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", true, true, true, 42) && !(null === twig_get_attribute($this->env, $this->source, ($context["priceInfo"] ?? null), "type", [], "any", false, false, true, 42)))) ? (twig_get_attribute($this->env, $this->source, ($context["priceInfo"] ?? null), "type", [], "any", false, false, true, 42)) : (null)), "nights" => (((twig_get_attribute($this->env, $this->source, ($context["priceInfo"] ?? null), "nights", [], "any", true, true, true, 42) && !(null === twig_get_attribute($this->env, $this->source, ($context["priceInfo"] ?? null), "nights", [], "any", false, false, true, 42)))) ? (twig_get_attribute($this->env, $this->source, ($context["priceInfo"] ?? null), "nights", [], "any", false, false, true, 42)) : (null))])) : (""));
// line 43
echo " ";
}
// line 44
echo " ";
}
// line 45
echo "
";
// line 46
$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))) : ([]));
// line 47
echo " ";
$context["moreRoomRows"] = true;
// line 48
echo "
<div class=\"js-room-selection__room my-3\"
data-availability-reference-id=\"";
// line 50
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", false, false, true, 50) === "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", false, false, true, 50)) : (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", false, false, true, 50))), "html", null, true);
echo "\"
data-room-id=\"";
// line 51
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", false, false, true, 51), 51, $this->source), "html", null, true);
echo "\"
data-tracking-variant=\"";
// line 52
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));
echo "\"
data-tracking-variant-id=\"";
// line 53
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", false, false, true, 53), 53, $this->source), "html", null, true);
echo "\"
data-settler-code=\"";
// line 54
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", null, true);
echo "\"
data-booking-type=\"";
// line 55
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", false, false, true, 55)) ? ("bookable") : ("onrequest"));
echo "\">
<div class=\"card\">
";
// line 59
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); })()))) {
// line 60
echo " ";
$context["firstPossibleIndex"] = twig_first($this->env, 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.', 60, $this->source); })()), "products", [], "any", false, false, true, 60), 60, $this->source)));
// line 61
echo " ";
$context["product"] = twig_get_attribute($this->env, $this->source, 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.', 61, $this->source); })()), "products", [], "any", false, false, true, 61), (isset($context["firstPossibleIndex"]) || array_key_exists("firstPossibleIndex", $context) ? $context["firstPossibleIndex"] : (function () { throw new RuntimeError('Variable "firstPossibleIndex" does not exist.', 61, $this->source); })()), [], "array", false, false, true, 61);
// line 62
echo " ";
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/teaser/room-teaser-content.desktop.html.twig", ["count" => // line 63
(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
(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
(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
(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
(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
(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
(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
(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
(isset($context["fromDate"]) || array_key_exists("fromDate", $context) ? $context["fromDate"] : (function () { throw new RuntimeError('Variable "fromDate" does not exist.', 73, $this->source); })()), "moreRoomRows" => false]);
// line 75
echo "
";
}
// line 77
echo "
<div id=\"room-row-collapse-parent-";
// line 78
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", false, false, true, 78), 78, $this->source), "html", null, true);
echo "\">
<div class=\"panel\">
";
// line 80
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); })()))) {
// line 81
echo " ";
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/teaser/room-details.html.twig", ["id" => twig_get_attribute($this->env, $this->source, // line 82
(isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 82, $this->source); })()), "getProductId", [], "method", false, false, true, 82), "accommodationProduct" => // line 83
(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
(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
(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
(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
(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
(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
(isset($context["tvbPackage"]) || array_key_exists("tvbPackage", $context) ? $context["tvbPackage"] : (function () { throw new RuntimeError('Variable "tvbPackage" does not exist.', 89, $this->source); })())]);
// line 90
echo "
";
}
// line 92
echo "
";
// line 93
if ((isset($context["availabilityIsChecked"]) || array_key_exists("availabilityIsChecked", $context) ? $context["availabilityIsChecked"] : (function () { throw new RuntimeError('Variable "availabilityIsChecked" does not exist.', 93, $this->source); })())) {
// line 94
echo "
";
// line 95
$context['_parent'] = $context;
$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", false, false, true, 95));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["productIndex"] => $context["product"]) {
// line 96
echo "
";
// line 97
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/teaser/room-teaser-content.desktop.html.twig", ["count" => // line 98
$context["productIndex"], "product" => // line 99
$context["product"], "productData" => // line 100
(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
(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
(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
(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
(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
(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
(isset($context["fromDate"]) || array_key_exists("fromDate", $context) ? $context["fromDate"] : (function () { throw new RuntimeError('Variable "fromDate" does not exist.', 107, $this->source); })())]);
// line 108
echo "
";
// line 110
if ((isset($context["hasSingleRoomRow"]) || array_key_exists("hasSingleRoomRow", $context) ? $context["hasSingleRoomRow"] : (function () { throw new RuntimeError('Variable "hasSingleRoomRow" does not exist.', 110, $this->source); })())) {
// line 111
echo "
";
// line 112
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/teaser/room-details.html.twig", ["id" => twig_get_attribute($this->env, $this->source, // line 113
$context["product"], "getProductId", [], "method", false, false, true, 113), "accommodationProduct" => // line 114
(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
(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
(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
(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
(isset($context["tvbPackage"]) || array_key_exists("tvbPackage", $context) ? $context["tvbPackage"] : (function () { throw new RuntimeError('Variable "tvbPackage" does not exist.', 119, $this->source); })())]);
// line 120
echo "
";
}
// line 122
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['productIndex'], $context['product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 123
echo " ";
} elseif ((isset($context["showAvailablityCalendar"]) || array_key_exists("showAvailablityCalendar", $context) ? $context["showAvailablityCalendar"] : (function () { throw new RuntimeError('Variable "showAvailablityCalendar" does not exist.', 123, $this->source); })())) {
// line 124
echo " ";
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/teaser/room-availabilities.html.twig", ["product" => // line 125
(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
(isset($context["accommodation"]) || array_key_exists("accommodation", $context) ? $context["accommodation"] : (function () { throw new RuntimeError('Variable "accommodation" does not exist.', 126, $this->source); })())]);
// line 127
echo "
";
}
// line 129
echo " </div>
</div>
</div>
</div>
</li>
";
}
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "@ElementsDemiFrontend/Includes/teaser/room-teaser.desktop.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{#
/**
* @var \\\\Pimcore\\\\Templating\\\\GlobalVariables app
* #
* @var productData array
* @var accommodation \\\\Elements\\\\Demi\\\\Model\\\\AccommodationServiceProvider
* @var settlerCode string
* @var bookOnRequest bool
* @var availabilityIsChecked bool
* @var hasSingleRoomRow bool
*/ #}
{% if searchParam is not defined or searchParam.getDateFrom() is empty %}
{% set fromDate = null %}
{% else %}
{% set fromDate = demi_getSearchFrom() %}
{% endif %}
{% if productData is iterable and productData.roomRow[0] is defined and productData.products[0] is defined%}
{% set possibleIndices = productData.roomRow | keys %}
{% set i = possibleIndices | first %}
{% set roomRow = productData.roomRow[i].getRowObject() %}
{% set product = productData.products[i] %}
{% set accommodationProduct = pimcore_object(product.getProductId()) %}
{% if accommodationProduct and accommodationProduct.isPublished() %}
<li>
{% if product %}
{% if roomRow %}
{% set priceData = product.getPriceData() %}
{% set price = product.getPrice() %}
{% set showVacancy = true %}
{% set showSelection = true %}
{% set vacancyCount = product.getUnits() %}
{% else %}
{% set priceData = null %}
{% set price = product.getBasePrice() %}
{% set showVacancy = false %}
{% set showSelection = false %}
{% set vacancyCount = 0 %}
{% set priceInfo = product.getPriceInfo() ?? null %}
{% set priceInfoText = priceInfo is not null ? include('@ElementsDemiFrontend/Includes/priceInfoStr.html.twig', {'type' : priceInfo.type ?? null, 'nights' : priceInfo.nights ?? null}) : '' %}
{% endif %}
{% endif %}
{% set images = accommodationProduct ? demi_getRoomPictures(accommodationProduct,fromDate) : [] %}
{% set moreRoomRows = true %}
<div class=\"js-room-selection__room my-3\"
data-availability-reference-id=\"{{ product.getAvailabilityReference() is same as \"Service\" ? product.getServiceId() : product.getProductId() }}\"
data-room-id=\"{{ product.getProductId() }}\"
data-tracking-variant=\"{{ demi_impressionVariant(accommodationProduct ?: product, tvbPackage) }}\"
data-tracking-variant-id=\"{{ product.getProductId() }}\"
data-settler-code=\"{{ settlerCode }}\"
data-booking-type=\"{{ product.getBookable() ? 'bookable' : 'onrequest' }}\">
<div class=\"card\">
{% if not availabilityIsChecked or not hasSingleRoomRow %}
{% set firstPossibleIndex = productData.products | keys | first%}
{% set product = productData.products[firstPossibleIndex] %}
{{ include(\"@ElementsDemiFrontend/Includes/teaser/room-teaser-content.desktop.html.twig\", {
\"count\" : firstPossibleIndex,
\"product\" : product,
\"productData\" : productData,
\"images\" : images,
\"tableOnSide\" : true,
\"hasSingleRoomRow\" : true,
\"availabilityIsChecked\" : availabilityIsChecked,
\"priceData\" : priceData,
\"priceInfoText\" : priceInfoText,
'tvbPackage' : tvbPackage,
'dateFrom' : fromDate,
'moreRoomRows' : false
}) }}
{% endif %}
<div id=\"room-row-collapse-parent-{{ product.getProductId() }}\">
<div class=\"panel\">
{% if not availabilityIsChecked or not hasSingleRoomRow %}
{{ include(\"@ElementsDemiFrontend/Includes/teaser/room-details.html.twig\", {
\"id\" : product.getProductId(),
\"accommodationProduct\" : accommodationProduct,
\"images\" : images,
\"availabilityIsChecked\" : availabilityIsChecked,
\"moreRoomRows\" : not hasSingleRoomRow ? moreRoomRows : '',
\"accommodation\" : accommodation,
\"dateFrom\" : fromDate,
\"pakcage\" : tvbPackage
}) }}
{% endif %}
{% if availabilityIsChecked %}
{% for productIndex, product in productData.products %}
{{ include(\"@ElementsDemiFrontend/Includes/teaser/room-teaser-content.desktop.html.twig\", {
\"count\" : productIndex,
\"product\" : product,
\"productData\" : productData,
\"images\" : images,
\"tableOnSide\" : false,
\"hasSingleRoomRow\" : hasSingleRoomRow,
\"availabilityIsChecked\" : availabilityIsChecked,
\"moreRoomRows\" : not hasSingleRoomRow ? moreRoomRows : null,
'tvbPackage' : tvbPackage,
'dateFrom' : fromDate,
}) }}
{% if hasSingleRoomRow %}
{{ include(\"@ElementsDemiFrontend/Includes/teaser/room-details.html.twig\", {
'id' : product.getProductId(),
\"accommodationProduct\" : accommodationProduct,
\"images\" : images,
\"availabilityIsChecked\" : availabilityIsChecked,
\"moreRoomRows\" : null,
\"dateFrom\" : fromDate,
\"package\" : tvbPackage
}) }}
{% endif %}
{% endfor %}
{% elseif showAvailablityCalendar %}
{{ include(\"@ElementsDemiFrontend/Includes/teaser/room-availabilities.html.twig\", {
'product' : accommodationProduct,
\"accommodation\" : accommodation
}) }}
{% endif %}
</div>
</div>
</div>
</div>
</li>
{% endif %}
{% endif %}
", "@ElementsDemiFrontend/Includes/teaser/room-teaser.desktop.html.twig", "/home/steiermark/www/src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/teaser/room-teaser.desktop.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 13, "set" => 14, "for" => 95);
static $filters = array("keys" => 20, "first" => 21, "escape" => 50);
static $functions = array("demi_getSearchFrom" => 16, "pimcore_object" => 24, "include" => 42, "demi_getRoomPictures" => 46, "demi_impressionVariant" => 52);
try {
$this->sandbox->checkSecurity(
['if', 'set', 'for'],
['keys', 'first', 'escape'],
['demi_getSearchFrom', 'pimcore_object', 'include', 'demi_getRoomPictures', 'demi_impressionVariant']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}