<?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/Map/map.html.twig */
class __TwigTemplate_f578a3d00e72edbb20825669b8ba8efc extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 7
return "@ElementsDemiFrontend/Layout/layout.html.twig";
}
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/Map/map.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/Map/map.html.twig"));
$this->parent = $this->loadTemplate("@ElementsDemiFrontend/Layout/layout.html.twig", "@ElementsDemiFrontend/Map/map.html.twig", 7);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 8
public function block_content($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(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 9
echo "
";
// line 10
$context["route"] = ((array_key_exists("tvbPackage", $context)) ? ("demi_tvb_map_poi_json") : ("demi_map_poi_json"));
// line 11
$context["mapPoiJson"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl($this->sandbox->ensureToStringAllowed((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 11, $this->source); })()), 11, $this->source), ["path" => twig_trim_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, // line 12
(isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 12, $this->source); })()), "getFullPath", [], "method", false, false, true, 12), 12, $this->source), "/", "left")]);
// line 14
$context["accoTeaserLink"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("demi_compact_teaser", ["path" => twig_trim_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, // line 15
(isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 15, $this->source); })()), "getFullPath", [], "method", false, false, true, 15), 15, $this->source), "/", "left")]);
// line 17
$context["nearbySearchJson"] = (("/var/tmp/typeahead/" . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_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.', 17, $this->source); })()), "request", [], "any", false, false, true, 17), "locale", [], "any", false, false, true, 17), 17, $this->source)) . "/nearbySearch.json");
// line 18
echo "<script>
_config.historyController = true;
_config.accommodationMap = true;
_config.accommodationMapPoisUrl = '";
// line 21
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["mapPoiJson"]) || array_key_exists("mapPoiJson", $context) ? $context["mapPoiJson"] : (function () { throw new RuntimeError('Variable "mapPoiJson" does not exist.', 21, $this->source); })()), 21, $this->source), "html", null, true);
echo "';
_config.accommodationMapDetailUrl = '";
// line 22
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["accoTeaserLink"]) || array_key_exists("accoTeaserLink", $context) ? $context["accoTeaserLink"] : (function () { throw new RuntimeError('Variable "accoTeaserLink" does not exist.', 22, $this->source); })()), 22, $this->source), "html", null, true);
echo "';
_config.acommodationMapHideBusinesses = ";
// line 23
echo (($this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getMapHideBusinesses", [])) ? ("true") : ("false"));
echo ";
";
// line 25
if ($this->extensions['Elements\Bundle\DemiFrontendBundle\Twig\DemiFrontendExtension']->fileExists((isset($context["nearbySearchJson"]) || array_key_exists("nearbySearchJson", $context) ? $context["nearbySearchJson"] : (function () { throw new RuntimeError('Variable "nearbySearchJson" does not exist.', 25, $this->source); })()), "PIMCORE_PUBLIC_VAR", "/var")) {
// line 26
echo " _config.nearbySearchAutocompleteUrl ='/cache-buster-";
echo $this->env->getFunction('demi_getExistingCacheFile')->getCallable()($this->sandbox->ensureToStringAllowed((isset($context["nearbySearchJson"]) || array_key_exists("nearbySearchJson", $context) ? $context["nearbySearchJson"] : (function () { throw new RuntimeError('Variable "nearbySearchJson" does not exist.', 26, $this->source); })()), 26, $this->source));
echo "';
";
}
// line 28
echo "</script>
<div id=\"map-overlay\" class=\"overlay is-open js-accommodation-map\">
<form action=\"\" class=\"\">
";
// line 32
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/overlays/sections/header-with-title.html.twig", ["title" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.map.view"), "backLink" => twig_get_attribute($this->env, $this->source, // line 34
(isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 34, $this->source); })()), "getFullPath", [], "method", false, false, true, 34)]);
// line 35
echo "
<div class=\"overlay__content js-accommodation-map accommodation-map\">
<div class=\"js-accommodation-map__canvas accommodation-map__canvas\"></div>
<div class=\"accommodation-map__controls accommodation-map__controls--top-full-width\">
";
// line 40
if ($this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getSortingNearbySearch", [])) {
// line 41
echo " <div class=\"js-nearby-search-autocomplete nearby-search-autocomplete js-filter-form__autocomplete\">
<div class=\"form-box\">
<div class=\"row row--gutter-width-0\">
<div class=\"col\">
<label class=\"d-block\" for=\"map-nearby\">
<script data-cookieconsent=\"ignore\">
_config.nearbySearch = true;
</script>
<input id=\"map-nearby\"
name=\"nearby\"
type=\"text\"
class=\"form-box__content form-control js-nearby-search-autocomplete__input\"
placeholder=\"";
// line 53
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.search.nearby"), "html", null, true);
echo "\">
</label>
</div>
<div class=\"col-auto\">
<button class=\"btn btn-primary form-box__addon-button js-nearby-search-autocomplete__my-location\"
type=\"button\"
title=\"";
// line 59
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.search.nearby.my-location"), "html", null, true);
echo "\"
aria-label=\"";
// line 60
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.search.nearby.my-location"), "html", null, true);
echo "\">
<span class=\"demi-icon demi-icon-target\" aria-hidden=\"true\"></span>
</button>
</div>
</div>
</div>
<section aria-expanded=\"false\" class=\"collapse js-multiselect-autocomplete__selected-detail\">
<div class=\"sr-only\">";
// line 69
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.filter.input-selected-values"), "html", null, true);
echo "</div>
<div class=\"form-box__detail py-3 js-multiselect-autocomplete__selected-values-list\">
</div>
</section>
</div>
";
}
// line 75
echo " <div class=\"mt-2 float-right\">
<button type=\"button\" class=\"btn btn-white accommodation-map__control accommodation-map__control--w-a js-draw-on-map__clear mr-2\" aria-hidden=\"true\" hidden=\"\">
";
// line 77
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.list.map.remove-area"), "html", null, true);
echo "
</button>
<button type=\"button\" class=\"btn btn-primary accommodation-map__control js-draw-on-map\" aria-hidden=\"true\">
<span class=\"demi-icon demi-icon-draw-on-map js-draw-on-map__start-drawing\"></span>
<span class=\"demi-icon demi-icon-close js-draw-on-map__cancel-drawing\" hidden=\"\"></span>
</button>
</div>
</div>
<div class=\"js-accommodation-map__detail accommodation-map__detail\" role=\"alert\" aria-live=\"assertive\">
<div class=\"js-accommodation-map__detail-loading text-center\" hidden>
";
// line 89
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig", ["styleModifier" => "my-5"]);
// line 91
echo "
</div>
";
// line 94
echo " <div class=\"js-accommodation-map__detail-content\">
</div>
</div>
</div>
</form>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "@ElementsDemiFrontend/Map/map.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 200 => 94, 196 => 91, 194 => 89, 179 => 77, 175 => 75, 166 => 69, 154 => 60, 150 => 59, 141 => 53, 127 => 41, 125 => 40, 118 => 35, 116 => 34, 115 => 32, 109 => 28, 103 => 26, 101 => 25, 96 => 23, 92 => 22, 88 => 21, 83 => 18, 81 => 17, 79 => 15, 78 => 14, 76 => 12, 75 => 11, 73 => 10, 70 => 9, 60 => 8, 37 => 7,);
}
public function getSourceContext()
{
return new Source("{#
* @var \\Pimcore\\Templating\\GlobalVariables app
*
* @var \\Elements\\Demi\\Model\\Package | null tvbPackage
*/ #}
{% extends '@ElementsDemiFrontend/Layout/layout.html.twig' %}
{% block content %}
{% set route = tvbPackage is defined ? 'demi_tvb_map_poi_json' : 'demi_map_poi_json' %}
{% set mapPoiJson = url(route, {
'path' : document.getFullPath() | trim('/', 'left')
}) %}
{% set accoTeaserLink = url('demi_compact_teaser', {
'path' : document.getFullPath() | trim('/', 'left')
}) %}
{% set nearbySearchJson = '/var/tmp/typeahead/' ~ app.request.locale ~ '/nearbySearch.json' %}
<script>
_config.historyController = true;
_config.accommodationMap = true;
_config.accommodationMapPoisUrl = '{{ mapPoiJson }}';
_config.accommodationMapDetailUrl = '{{ accoTeaserLink }}';
_config.acommodationMapHideBusinesses = {{ demi_core_configuration('getMapHideBusinesses', {}) ? 'true' : 'false' }};
{% if demi_fileExists(nearbySearchJson, \"PIMCORE_PUBLIC_VAR\", '/var') %}
_config.nearbySearchAutocompleteUrl ='/cache-buster-{{ demi_getExistingCacheFile(nearbySearchJson) }}';
{% endif %}
</script>
<div id=\"map-overlay\" class=\"overlay is-open js-accommodation-map\">
<form action=\"\" class=\"\">
{{ include('@ElementsDemiFrontend/Includes/overlays/sections/header-with-title.html.twig', {
'title' : 'demi.map.view' | trans,
'backLink' : document.getFullPath()
}) }}
<div class=\"overlay__content js-accommodation-map accommodation-map\">
<div class=\"js-accommodation-map__canvas accommodation-map__canvas\"></div>
<div class=\"accommodation-map__controls accommodation-map__controls--top-full-width\">
{% if demi_core_configuration(\"getSortingNearbySearch\", {}) %}
<div class=\"js-nearby-search-autocomplete nearby-search-autocomplete js-filter-form__autocomplete\">
<div class=\"form-box\">
<div class=\"row row--gutter-width-0\">
<div class=\"col\">
<label class=\"d-block\" for=\"map-nearby\">
<script data-cookieconsent=\"ignore\">
_config.nearbySearch = true;
</script>
<input id=\"map-nearby\"
name=\"nearby\"
type=\"text\"
class=\"form-box__content form-control js-nearby-search-autocomplete__input\"
placeholder=\"{{ 'demi.search.nearby' | trans }}\">
</label>
</div>
<div class=\"col-auto\">
<button class=\"btn btn-primary form-box__addon-button js-nearby-search-autocomplete__my-location\"
type=\"button\"
title=\"{{ 'demi.search.nearby.my-location' | trans }}\"
aria-label=\"{{ 'demi.search.nearby.my-location' | trans }}\">
<span class=\"demi-icon demi-icon-target\" aria-hidden=\"true\"></span>
</button>
</div>
</div>
</div>
<section aria-expanded=\"false\" class=\"collapse js-multiselect-autocomplete__selected-detail\">
<div class=\"sr-only\">{{ \"demi.filter.input-selected-values\" | trans }}</div>
<div class=\"form-box__detail py-3 js-multiselect-autocomplete__selected-values-list\">
</div>
</section>
</div>
{% endif %}
<div class=\"mt-2 float-right\">
<button type=\"button\" class=\"btn btn-white accommodation-map__control accommodation-map__control--w-a js-draw-on-map__clear mr-2\" aria-hidden=\"true\" hidden=\"\">
{{ \"demi.list.map.remove-area\"| trans }}
</button>
<button type=\"button\" class=\"btn btn-primary accommodation-map__control js-draw-on-map\" aria-hidden=\"true\">
<span class=\"demi-icon demi-icon-draw-on-map js-draw-on-map__start-drawing\"></span>
<span class=\"demi-icon demi-icon-close js-draw-on-map__cancel-drawing\" hidden=\"\"></span>
</button>
</div>
</div>
<div class=\"js-accommodation-map__detail accommodation-map__detail\" role=\"alert\" aria-live=\"assertive\">
<div class=\"js-accommodation-map__detail-loading text-center\" hidden>
{{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig', {
'styleModifier' : 'my-5'
}) }}
</div>
{# ajax loaded #}
<div class=\"js-accommodation-map__detail-content\">
</div>
</div>
</div>
</form>
</div>
{% endblock %}
", "@ElementsDemiFrontend/Map/map.html.twig", "/home/steiermark/www/src/Elements/Bundle/DemiFrontendBundle/Resources/views/Map/map.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 10, "if" => 25);
static $filters = array("trim" => 12, "escape" => 21, "trans" => 33);
static $functions = array("url" => 11, "demi_core_configuration" => 23, "demi_fileExists" => 25, "demi_getExistingCacheFile" => 26, "include" => 32);
try {
$this->sandbox->checkSecurity(
['set', 'if'],
['trim', 'escape', 'trans'],
['url', 'demi_core_configuration', 'demi_fileExists', 'demi_getExistingCacheFile', 'include']
);
} 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;
}
}
}