var/cache/dev/twig/5b/5b4fade5d5539efe450297bab75159c7.php line 76

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/Map/map.html.twig */
  14. class __TwigTemplate_f578a3d00e72edbb20825669b8ba8efc 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->blocks = [
  23.             'content' => [$this'block_content'],
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 7
  31.         return "@ElementsDemiFrontend/Layout/layout.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ElementsDemiFrontend/Map/map.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ElementsDemiFrontend/Map/map.html.twig"));
  40.         $this->parent $this->loadTemplate("@ElementsDemiFrontend/Layout/layout.html.twig""@ElementsDemiFrontend/Map/map.html.twig"7);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 8
  48.     public function block_content($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  55.         // line 9
  56.         echo "
  57. ";
  58.         // line 10
  59.         $context["route"] = ((array_key_exists("tvbPackage"$context)) ? ("demi_tvb_map_poi_json") : ("demi_map_poi_json"));
  60.         // line 11
  61.         $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
  62. (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'12$this->source); })()), "getFullPath", [], "method"falsefalsetrue12), 12$this->source), "/""left")]);
  63.         // line 14
  64.         $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
  65. (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'15$this->source); })()), "getFullPath", [], "method"falsefalsetrue15), 15$this->source), "/""left")]);
  66.         // line 17
  67.         $context["nearbySearchJson"] = (("/var/tmp/typeahead/" $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'17$this->source); })()), "request", [], "any"falsefalsetrue17), "locale", [], "any"falsefalsetrue17), 17$this->source)) . "/nearbySearch.json");
  68.         // line 18
  69.         echo "<script>
  70.     _config.historyController = true;
  71.     _config.accommodationMap = true;
  72.     _config.accommodationMapPoisUrl = '";
  73.         // line 21
  74.         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"nulltrue);
  75.         echo "';
  76.     _config.accommodationMapDetailUrl = '";
  77.         // line 22
  78.         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"nulltrue);
  79.         echo "';
  80.     _config.acommodationMapHideBusinesses = ";
  81.         // line 23
  82.         echo (($this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getMapHideBusinesses", [])) ? ("true") : ("false"));
  83.         echo ";
  84.     ";
  85.         // line 25
  86.         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")) {
  87.             // line 26
  88.             echo "        _config.nearbySearchAutocompleteUrl ='/cache-buster-";
  89.             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));
  90.             echo "';
  91.     ";
  92.         }
  93.         // line 28
  94.         echo "</script>
  95. <div id=\"map-overlay\" class=\"overlay is-open js-accommodation-map\">
  96.     <form action=\"\" class=\"\">
  97.         ";
  98.         // line 32
  99.         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
  100. (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'34$this->source); })()), "getFullPath", [], "method"falsefalsetrue34)]);
  101.         // line 35
  102.         echo "
  103.         <div class=\"overlay__content js-accommodation-map accommodation-map\">
  104.             <div class=\"js-accommodation-map__canvas accommodation-map__canvas\"></div>
  105.             <div class=\"accommodation-map__controls accommodation-map__controls--top-full-width\">
  106.                     ";
  107.         // line 40
  108.         if ($this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getSortingNearbySearch", [])) {
  109.             // line 41
  110.             echo "                        <div class=\"js-nearby-search-autocomplete nearby-search-autocomplete js-filter-form__autocomplete\">
  111.                             <div class=\"form-box\">
  112.                                 <div class=\"row row--gutter-width-0\">
  113.                                     <div class=\"col\">
  114.                                         <label class=\"d-block\" for=\"map-nearby\">
  115.                                             <script data-cookieconsent=\"ignore\">
  116.                                                 _config.nearbySearch = true;
  117.                                             </script>
  118.                                             <input id=\"map-nearby\"
  119.                                                    name=\"nearby\"
  120.                                                    type=\"text\"
  121.                                                    class=\"form-box__content form-control js-nearby-search-autocomplete__input\"
  122.                                                    placeholder=\"";
  123.             // line 53
  124.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.search.nearby"), "html"nulltrue);
  125.             echo "\">
  126.                                         </label>
  127.                                     </div>
  128.                                     <div class=\"col-auto\">
  129.                                         <button class=\"btn btn-primary form-box__addon-button js-nearby-search-autocomplete__my-location\"
  130.                                                 type=\"button\"
  131.                                                 title=\"";
  132.             // line 59
  133.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.search.nearby.my-location"), "html"nulltrue);
  134.             echo "\"
  135.                                                 aria-label=\"";
  136.             // line 60
  137.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.search.nearby.my-location"), "html"nulltrue);
  138.             echo "\">
  139.                                             <span class=\"demi-icon demi-icon-target\" aria-hidden=\"true\"></span>
  140.                                         </button>
  141.                                     </div>
  142.                                 </div>
  143.                             </div>
  144.                             <section aria-expanded=\"false\" class=\"collapse js-multiselect-autocomplete__selected-detail\">
  145.                                 <div class=\"sr-only\">";
  146.             // line 69
  147.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.filter.input-selected-values"), "html"nulltrue);
  148.             echo "</div>
  149.                                 <div class=\"form-box__detail py-3 js-multiselect-autocomplete__selected-values-list\">
  150.                                 </div>
  151.                             </section>
  152.                         </div>
  153.                     ";
  154.         }
  155.         // line 75
  156.         echo "                    <div class=\"mt-2 float-right\">
  157.                         <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=\"\">
  158.                            ";
  159.         // line 77
  160.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("demi.list.map.remove-area"), "html"nulltrue);
  161.         echo "
  162.                         </button>
  163.                         <button type=\"button\" class=\"btn btn-primary accommodation-map__control js-draw-on-map\" aria-hidden=\"true\">
  164.                             <span class=\"demi-icon demi-icon-draw-on-map js-draw-on-map__start-drawing\"></span>
  165.                             <span class=\"demi-icon demi-icon-close js-draw-on-map__cancel-drawing\" hidden=\"\"></span>
  166.                         </button>
  167.                     </div>
  168.             </div>
  169.             <div class=\"js-accommodation-map__detail accommodation-map__detail\" role=\"alert\" aria-live=\"assertive\">
  170.                 <div class=\"js-accommodation-map__detail-loading text-center\" hidden>
  171.                     ";
  172.         // line 89
  173.         echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig", ["styleModifier" => "my-5"]);
  174.         // line 91
  175.         echo "
  176.                 </div>
  177.                 ";
  178.         // line 94
  179.         echo "                <div class=\"js-accommodation-map__detail-content\">
  180.                 </div>
  181.             </div>
  182.         </div>
  183.     </form>
  184. </div>
  185. ";
  186.         
  187.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  188.         
  189.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  190.     }
  191.     /**
  192.      * @codeCoverageIgnore
  193.      */
  194.     public function getTemplateName()
  195.     {
  196.         return "@ElementsDemiFrontend/Map/map.html.twig";
  197.     }
  198.     /**
  199.      * @codeCoverageIgnore
  200.      */
  201.     public function isTraitable()
  202.     {
  203.         return false;
  204.     }
  205.     /**
  206.      * @codeCoverageIgnore
  207.      */
  208.     public function getDebugInfo()
  209.     {
  210.         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,);
  211.     }
  212.     public function getSourceContext()
  213.     {
  214.         return new Source("{#
  215.  * @var \\Pimcore\\Templating\\GlobalVariables app
  216.  *
  217.  * @var \\Elements\\Demi\\Model\\Package | null tvbPackage
  218.  */ #}
  219. {% extends '@ElementsDemiFrontend/Layout/layout.html.twig' %}
  220. {% block content %}
  221. {% set route = tvbPackage is defined ? 'demi_tvb_map_poi_json' : 'demi_map_poi_json' %}
  222. {% set mapPoiJson = url(route, {
  223.     'path' : document.getFullPath() | trim('/', 'left')
  224. }) %}
  225. {% set accoTeaserLink = url('demi_compact_teaser', {
  226.     'path' : document.getFullPath() | trim('/', 'left')
  227. }) %}
  228. {% set nearbySearchJson = '/var/tmp/typeahead/' ~ app.request.locale ~ '/nearbySearch.json' %}
  229. <script>
  230.     _config.historyController = true;
  231.     _config.accommodationMap = true;
  232.     _config.accommodationMapPoisUrl = '{{ mapPoiJson }}';
  233.     _config.accommodationMapDetailUrl = '{{ accoTeaserLink }}';
  234.     _config.acommodationMapHideBusinesses = {{ demi_core_configuration('getMapHideBusinesses', {}) ? 'true' : 'false' }};
  235.     {% if demi_fileExists(nearbySearchJson, \"PIMCORE_PUBLIC_VAR\", '/var') %}
  236.         _config.nearbySearchAutocompleteUrl ='/cache-buster-{{ demi_getExistingCacheFile(nearbySearchJson) }}';
  237.     {% endif %}
  238. </script>
  239. <div id=\"map-overlay\" class=\"overlay is-open js-accommodation-map\">
  240.     <form action=\"\" class=\"\">
  241.         {{ include('@ElementsDemiFrontend/Includes/overlays/sections/header-with-title.html.twig', {
  242.             'title' : 'demi.map.view' | trans,
  243.             'backLink' : document.getFullPath()
  244.         }) }}
  245.         <div class=\"overlay__content js-accommodation-map accommodation-map\">
  246.             <div class=\"js-accommodation-map__canvas accommodation-map__canvas\"></div>
  247.             <div class=\"accommodation-map__controls accommodation-map__controls--top-full-width\">
  248.                     {%  if demi_core_configuration(\"getSortingNearbySearch\", {}) %}
  249.                         <div class=\"js-nearby-search-autocomplete nearby-search-autocomplete js-filter-form__autocomplete\">
  250.                             <div class=\"form-box\">
  251.                                 <div class=\"row row--gutter-width-0\">
  252.                                     <div class=\"col\">
  253.                                         <label class=\"d-block\" for=\"map-nearby\">
  254.                                             <script data-cookieconsent=\"ignore\">
  255.                                                 _config.nearbySearch = true;
  256.                                             </script>
  257.                                             <input id=\"map-nearby\"
  258.                                                    name=\"nearby\"
  259.                                                    type=\"text\"
  260.                                                    class=\"form-box__content form-control js-nearby-search-autocomplete__input\"
  261.                                                    placeholder=\"{{ 'demi.search.nearby' | trans }}\">
  262.                                         </label>
  263.                                     </div>
  264.                                     <div class=\"col-auto\">
  265.                                         <button class=\"btn btn-primary form-box__addon-button js-nearby-search-autocomplete__my-location\"
  266.                                                 type=\"button\"
  267.                                                 title=\"{{ 'demi.search.nearby.my-location' | trans }}\"
  268.                                                 aria-label=\"{{ 'demi.search.nearby.my-location' | trans }}\">
  269.                                             <span class=\"demi-icon demi-icon-target\" aria-hidden=\"true\"></span>
  270.                                         </button>
  271.                                     </div>
  272.                                 </div>
  273.                             </div>
  274.                             <section aria-expanded=\"false\" class=\"collapse js-multiselect-autocomplete__selected-detail\">
  275.                                 <div class=\"sr-only\">{{ \"demi.filter.input-selected-values\" | trans }}</div>
  276.                                 <div class=\"form-box__detail py-3 js-multiselect-autocomplete__selected-values-list\">
  277.                                 </div>
  278.                             </section>
  279.                         </div>
  280.                     {% endif %}
  281.                     <div class=\"mt-2 float-right\">
  282.                         <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=\"\">
  283.                            {{ \"demi.list.map.remove-area\"| trans }}
  284.                         </button>
  285.                         <button type=\"button\" class=\"btn btn-primary accommodation-map__control js-draw-on-map\" aria-hidden=\"true\">
  286.                             <span class=\"demi-icon demi-icon-draw-on-map js-draw-on-map__start-drawing\"></span>
  287.                             <span class=\"demi-icon demi-icon-close js-draw-on-map__cancel-drawing\" hidden=\"\"></span>
  288.                         </button>
  289.                     </div>
  290.             </div>
  291.             <div class=\"js-accommodation-map__detail accommodation-map__detail\" role=\"alert\" aria-live=\"assertive\">
  292.                 <div class=\"js-accommodation-map__detail-loading text-center\" hidden>
  293.                     {{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig', {
  294.                         'styleModifier' : 'my-5'
  295.                     }) }}
  296.                 </div>
  297.                 {# ajax loaded #}
  298.                 <div class=\"js-accommodation-map__detail-content\">
  299.                 </div>
  300.             </div>
  301.         </div>
  302.     </form>
  303. </div>
  304. {% endblock %}
  305. ""@ElementsDemiFrontend/Map/map.html.twig""/home/steiermark/www/src/Elements/Bundle/DemiFrontendBundle/Resources/views/Map/map.html.twig");
  306.     }
  307.     
  308.     public function checkSecurity()
  309.     {
  310.         static $tags = array("set" => 10"if" => 25);
  311.         static $filters = array("trim" => 12"escape" => 21"trans" => 33);
  312.         static $functions = array("url" => 11"demi_core_configuration" => 23"demi_fileExists" => 25"demi_getExistingCacheFile" => 26"include" => 32);
  313.         try {
  314.             $this->sandbox->checkSecurity(
  315.                 ['set''if'],
  316.                 ['trim''escape''trans'],
  317.                 ['url''demi_core_configuration''demi_fileExists''demi_getExistingCacheFile''include']
  318.             );
  319.         } catch (SecurityError $e) {
  320.             $e->setSourceContext($this->source);
  321.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  322.                 $e->setTemplateLine($tags[$e->getTagName()]);
  323.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  324.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  325.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  326.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  327.             }
  328.             throw $e;
  329.         }
  330.     }
  331. }