var/cache/dev/twig/c6/c6c73b5f9a2a94e51b040b418813569d.php line 108

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/Layout/layout.html.twig */
  14. class __TwigTemplate_70a14d1cc2c0517cb8d17f01c89a2411 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/Layout/layout.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/Layout/layout.html.twig"));
  35.         // line 1
  36.         echo "<!doctype html>
  37. <html lang=\"";
  38.         // line 2
  39.         echo twig_escape_filter($this->env$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.'2$this->source); })()), "request", [], "any"falsefalsetrue2), "locale", [], "any"falsefalsetrue2), 2$this->source), "html"nulltrue);
  40.         echo "\">
  41. <head>
  42.     <script>
  43.     /* ga mock function */
  44.     (function(i,s,r){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  45.     (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();
  46.     })(window,document,'ga');
  47.     </script>
  48.     ";
  49.         // line 10
  50.         if (($this->extensions['App\Twig\LayoutExtension']->hasGetParams() || twig_in_filter("demi_checkout"twig_get_attribute($this->env$this->sourcetwig_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.'10$this->source); })()), "request", [], "any"falsefalsetrue10), "attributes", [], "any"falsefalsetrue10), "get", ["_route"], "method"falsefalsetrue10)))) {
  51.             // line 11
  52.             echo "        ";
  53.             twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsRobots(), "setNoIndex", [true], "method"falsefalsetrue11);
  54.             // line 12
  55.             echo "    ";
  56.         }
  57.         // line 13
  58.         echo "    ";
  59.         echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/layout/head.html.twig");
  60.         echo "
  61.     ";
  62.         // line 15
  63.         echo twig_include($this->env$context"Layout/includes/codeHead.html.twig");
  64.         echo "
  65. </head>
  66. <body>
  67. ";
  68.         // line 18
  69.         if (( !$this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getIsWhitelabel", []) &&  !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'18$this->source); })()))) {
  70.             // line 19
  71.             echo "    ";
  72.             echo twig_include($this->env$context"Navigation/navbar.html.twig");
  73.             echo "
  74. ";
  75.         }
  76.         // line 21
  77.         if ($this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getIsWhitelabel", [])) {
  78.             // line 22
  79.             echo "    ";
  80.             twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", ["affiliate"true], "method"falsefalsetrue22);
  81.             // line 23
  82.             echo "    ";
  83.             twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", ["affiliateTarget""_blank"], "method"falsefalsetrue23);
  84.             // line 24
  85.             echo "
  86.     <main id=\"main-content\" role=\"main\" class=\"content-block\">
  87.         ";
  88.             // line 26
  89.             $this->displayBlock("content"$context$blocks);
  90.             echo "
  91.     </main>
  92. ";
  93.         } else {
  94.             // line 29
  95.             echo "    <div class=\"main-content--spacing main-content--no-hero-small content-block\">
  96.         ";
  97.             // line 30
  98.             $this->displayBlock("content"$context$blocks);
  99.             echo "
  100.     </div>
  101. ";
  102.         }
  103.         // line 33
  104.         echo "
  105. ";
  106.         // line 34
  107.         if (( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'34$this->source); })()) && $this->env->getTest('instanceof')->getCallable()(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'34$this->source); })()), "property", ["modal_info"], "method"falsefalsetrue34), "\\Pimcore\\Model\\Document\\Snippet"))) {
  108.             // line 35
  109.             echo "    ";
  110.             echo $this->env->getFunction('pimcore_inc')->getCallable()($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'35$this->source); })()), "property", ["modal_info"], "method"falsefalsetrue35), 35$this->source));
  111.             echo "
  112. ";
  113.         }
  114.         // line 37
  115.         echo "
  116. ";
  117.         // line 38
  118.         if ( !$this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getIsWhitelabel", [])) {
  119.             // line 39
  120.             echo "    ";
  121.             echo $this->env->getFunction('pimcore_inc')->getCallable()($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'39$this->source); })()), "property", ["footer"], "method"falsefalsetrue39), 39$this->source), ["footerStyleModifier" => "footer--has-smaller-padding content-block"]);
  122.             echo "
  123. ";
  124.         }
  125.         // line 41
  126.         echo "
  127. ";
  128.         // line 42
  129.         echo $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig();
  130.         echo "
  131. ";
  132.         // line 44
  133.         if ((array_key_exists("loadMerchJs"$context) && ((isset($context["loadMerchJs"]) || array_key_exists("loadMerchJs"$context) ? $context["loadMerchJs"] : (function () { throw new RuntimeError('Variable "loadMerchJs" does not exist.'44$this->source); })()) == true))) {
  134.             // line 45
  135.             echo "    ";
  136.             echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/layout/jsScriptsMerchandiseShop.html.twig");
  137.             echo "
  138. ";
  139.         } elseif ((        // line 46
  140. array_key_exists("loadAdditionalServiceJs"$context) && ((isset($context["loadAdditionalServiceJs"]) || array_key_exists("loadAdditionalServiceJs"$context) ? $context["loadAdditionalServiceJs"] : (function () { throw new RuntimeError('Variable "loadAdditionalServiceJs" does not exist.'46$this->source); })()) == true))) {
  141.             // line 47
  142.             echo "    ";
  143.             echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/layout/jsScriptsAdditionalService.html.twig");
  144.             echo "
  145. ";
  146.         } else {
  147.             // line 49
  148.             echo "    ";
  149.             echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/layout/jsScripts.html.twig");
  150.             echo "
  151. ";
  152.         }
  153.         // line 51
  154.         echo "
  155. ";
  156.         // line 53
  157.         $context["now"] = twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\CmsToolsBundle\Twig\CarbonExtension']->carbon(), "now", [], "method"falsefalsetrue53);
  158.         // line 54
  159.         $context["earliestProposedFromDate"] = twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\CmsToolsBundle\Twig\CarbonExtension']->carbon(), "createFromFormat", ["Y-m-d H:i:s""2020-03-19 12:00:00"], "method"falsefalsetrue54);
  160.         // line 55
  161.         $context["earliestProposedToDate"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["earliestProposedFromDate"]) || array_key_exists("earliestProposedFromDate"$context) ? $context["earliestProposedFromDate"] : (function () { throw new RuntimeError('Variable "earliestProposedFromDate" does not exist.'55$this->source); })()), "copy", [], "method"falsefalsetrue55), "addDays", [7], "method"falsefalsetrue55);
  162.         // line 56
  163.         if (twig_get_attribute($this->env$this->source, (isset($context["earliestProposedFromDate"]) || array_key_exists("earliestProposedFromDate"$context) ? $context["earliestProposedFromDate"] : (function () { throw new RuntimeError('Variable "earliestProposedFromDate" does not exist.'56$this->source); })()), "gt", [(isset($context["now"]) || array_key_exists("now"$context) ? $context["now"] : (function () { throw new RuntimeError('Variable "now" does not exist.'56$this->source); })())], "method"falsefalsetrue56)) {
  164.             // line 57
  165.             echo "    <script type=\"text/javascript\" data-cookieconsent=\"ignore\">
  166.         _initialState.searchForm.from = '";
  167.             // line 58
  168.             echo twig_escape_filter($this->env$this->extensions['Elements\Bundle\CmsToolsBundle\Twig\CmsToolsHelperExtension']->customDateFormat($this->sandbox->ensureToStringAllowed((isset($context["earliestProposedFromDate"]) || array_key_exists("earliestProposedFromDate"$context) ? $context["earliestProposedFromDate"] : (function () { throw new RuntimeError('Variable "earliestProposedFromDate" does not exist.'58$this->source); })()), 58$this->source)), "html"nulltrue);
  169.             echo "';
  170.         _initialState.searchForm.to = '";
  171.             // line 59
  172.             echo twig_escape_filter($this->env$this->extensions['Elements\Bundle\CmsToolsBundle\Twig\CmsToolsHelperExtension']->customDateFormat($this->sandbox->ensureToStringAllowed((isset($context["earliestProposedToDate"]) || array_key_exists("earliestProposedToDate"$context) ? $context["earliestProposedToDate"] : (function () { throw new RuntimeError('Variable "earliestProposedToDate" does not exist.'59$this->source); })()), 59$this->source)), "html"nulltrue);
  173.             echo "';
  174.     </script>
  175. ";
  176.         }
  177.         // line 62
  178.         echo "<div class=\"custom-cursor js-custom-cursor\"></div>
  179. </body>
  180. </html>
  181. ";
  182.         
  183.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  184.         
  185.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  186.     }
  187.     /**
  188.      * @codeCoverageIgnore
  189.      */
  190.     public function getTemplateName()
  191.     {
  192.         return "@ElementsDemiFrontend/Layout/layout.html.twig";
  193.     }
  194.     /**
  195.      * @codeCoverageIgnore
  196.      */
  197.     public function isTraitable()
  198.     {
  199.         return false;
  200.     }
  201.     /**
  202.      * @codeCoverageIgnore
  203.      */
  204.     public function getDebugInfo()
  205.     {
  206.         return array (  190 => 62,  184 => 59,  180 => 58,  177 => 57,  175 => 56,  173 => 55,  171 => 54,  169 => 53,  165 => 51,  159 => 49,  153 => 47,  151 => 46,  146 => 45,  144 => 44,  139 => 42,  136 => 41,  130 => 39,  128 => 38,  125 => 37,  119 => 35,  117 => 34,  114 => 33,  108 => 30,  105 => 29,  99 => 26,  95 => 24,  92 => 23,  89 => 22,  87 => 21,  81 => 19,  79 => 18,  73 => 15,  67 => 13,  64 => 12,  61 => 11,  59 => 10,  48 => 2,  45 => 1,);
  207.     }
  208.     public function getSourceContext()
  209.     {
  210.         return new Source("<!doctype html>
  211. <html lang=\"{{ app.request.locale }}\">
  212. <head>
  213.     <script>
  214.     /* ga mock function */
  215.     (function(i,s,r){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  216.     (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();
  217.     })(window,document,'ga');
  218.     </script>
  219.     {% if hasGetParams() or 'demi_checkout' in app.request.attributes.get('_route') %}
  220.         {% do elements_robots().setNoIndex(true) %}
  221.     {% endif %}
  222.     {{ include('@ElementsDemiFrontend/Includes/layout/head.html.twig') }}
  223.     {{ include('Layout/includes/codeHead.html.twig') }}
  224. </head>
  225. <body>
  226. {% if not demi_core_configuration(\"getIsWhitelabel\", {}) and not editmode %}
  227.     {{ include('Navigation/navbar.html.twig') }}
  228. {% endif %}
  229. {% if demi_core_configuration(\"getIsWhitelabel\", {}) %}
  230.     {% do jsConfig().add('affiliate', true) %}
  231.     {% do jsConfig().add('affiliateTarget', '_blank') %}
  232.     <main id=\"main-content\" role=\"main\" class=\"content-block\">
  233.         {{ block('content') }}
  234.     </main>
  235. {% else %}
  236.     <div class=\"main-content--spacing main-content--no-hero-small content-block\">
  237.         {{ block('content') }}
  238.     </div>
  239. {% endif %}
  240. {% if not editmode and document.property('modal_info') is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Snippet') %}
  241.     {{ pimcore_inc(document.property('modal_info')) }}
  242. {% endif %}
  243. {% if not demi_core_configuration(\"getIsWhitelabel\", {}) %}
  244.     {{ pimcore_inc(document.property('footer'), {footerStyleModifier: 'footer--has-smaller-padding content-block'}) }}
  245. {% endif %}
  246. {{ jsConfig() }}
  247. {% if loadMerchJs is defined and loadMerchJs == true %}
  248.     {{ include('@ElementsDemiFrontend/Includes/layout/jsScriptsMerchandiseShop.html.twig') }}
  249. {% elseif loadAdditionalServiceJs is defined and loadAdditionalServiceJs == true %}
  250.     {{ include('@ElementsDemiFrontend/Includes/layout/jsScriptsAdditionalService.html.twig') }}
  251. {%  else %}
  252.     {{ include('@ElementsDemiFrontend/Includes/layout/jsScripts.html.twig') }}
  253. {% endif %}
  254. {% set now = carbon().now() %}
  255. {% set earliestProposedFromDate = carbon().createFromFormat('Y-m-d H:i:s', '2020-03-19 12:00:00') %}
  256. {% set earliestProposedToDate = earliestProposedFromDate.copy().addDays(7) %}
  257. {% if earliestProposedFromDate.gt(now) %}
  258.     <script type=\"text/javascript\" data-cookieconsent=\"ignore\">
  259.         _initialState.searchForm.from = '{{ elements_customDateFormat(earliestProposedFromDate) }}';
  260.         _initialState.searchForm.to = '{{ elements_customDateFormat(earliestProposedToDate) }}';
  261.     </script>
  262. {% endif %}
  263. <div class=\"custom-cursor js-custom-cursor\"></div>
  264. </body>
  265. </html>
  266. ""@ElementsDemiFrontend/Layout/layout.html.twig""/home/steiermark/www/src/Elements/Bundle/DemiFrontendBundle/Resources/views/Layout/layout.html.twig");
  267.     }
  268.     
  269.     public function checkSecurity()
  270.     {
  271.         static $tags = array("if" => 10"do" => 11"set" => 53);
  272.         static $filters = array("escape" => 2);
  273.         static $functions = array("hasGetParams" => 10"elements_robots" => 11"include" => 13"demi_core_configuration" => 18"jsConfig" => 22"pimcore_inc" => 35"carbon" => 53"elements_customDateFormat" => 58);
  274.         try {
  275.             $this->sandbox->checkSecurity(
  276.                 ['if''do''set'],
  277.                 ['escape'],
  278.                 ['hasGetParams''elements_robots''include''demi_core_configuration''jsConfig''pimcore_inc''carbon''elements_customDateFormat']
  279.             );
  280.         } catch (SecurityError $e) {
  281.             $e->setSourceContext($this->source);
  282.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  283.                 $e->setTemplateLine($tags[$e->getTagName()]);
  284.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  285.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  286.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  287.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  288.             }
  289.             throw $e;
  290.         }
  291.     }
  292. }