<?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/Layout/layout.html.twig */
class __TwigTemplate_70a14d1cc2c0517cb8d17f01c89a2411 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/Layout/layout.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/Layout/layout.html.twig"));
// line 1
echo "<!doctype html>
<html lang=\"";
// line 2
echo twig_escape_filter($this->env, $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.', 2, $this->source); })()), "request", [], "any", false, false, true, 2), "locale", [], "any", false, false, true, 2), 2, $this->source), "html", null, true);
echo "\">
<head>
<script>
/* ga mock function */
(function(i,s,r){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();
})(window,document,'ga');
</script>
";
// line 10
if (($this->extensions['App\Twig\LayoutExtension']->hasGetParams() || twig_in_filter("demi_checkout", twig_get_attribute($this->env, $this->source, 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.', 10, $this->source); })()), "request", [], "any", false, false, true, 10), "attributes", [], "any", false, false, true, 10), "get", ["_route"], "method", false, false, true, 10)))) {
// line 11
echo " ";
twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsRobots(), "setNoIndex", [true], "method", false, false, true, 11);
// line 12
echo " ";
}
// line 13
echo " ";
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/layout/head.html.twig");
echo "
";
// line 15
echo twig_include($this->env, $context, "Layout/includes/codeHead.html.twig");
echo "
</head>
<body>
";
// line 18
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); })()))) {
// line 19
echo " ";
echo twig_include($this->env, $context, "Navigation/navbar.html.twig");
echo "
";
}
// line 21
if ($this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getIsWhitelabel", [])) {
// line 22
echo " ";
twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", ["affiliate", true], "method", false, false, true, 22);
// line 23
echo " ";
twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", ["affiliateTarget", "_blank"], "method", false, false, true, 23);
// line 24
echo "
<main id=\"main-content\" role=\"main\" class=\"content-block\">
";
// line 26
$this->displayBlock("content", $context, $blocks);
echo "
</main>
";
} else {
// line 29
echo " <div class=\"main-content--spacing main-content--no-hero-small content-block\">
";
// line 30
$this->displayBlock("content", $context, $blocks);
echo "
</div>
";
}
// line 33
echo "
";
// line 34
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", false, false, true, 34), "\\Pimcore\\Model\\Document\\Snippet"))) {
// line 35
echo " ";
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", false, false, true, 35), 35, $this->source));
echo "
";
}
// line 37
echo "
";
// line 38
if ( !$this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getIsWhitelabel", [])) {
// line 39
echo " ";
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", false, false, true, 39), 39, $this->source), ["footerStyleModifier" => "footer--has-smaller-padding content-block"]);
echo "
";
}
// line 41
echo "
";
// line 42
echo $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig();
echo "
";
// line 44
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))) {
// line 45
echo " ";
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/layout/jsScriptsMerchandiseShop.html.twig");
echo "
";
} elseif (( // line 46
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))) {
// line 47
echo " ";
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/layout/jsScriptsAdditionalService.html.twig");
echo "
";
} else {
// line 49
echo " ";
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/layout/jsScripts.html.twig");
echo "
";
}
// line 51
echo "
";
// line 53
$context["now"] = twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\CmsToolsBundle\Twig\CarbonExtension']->carbon(), "now", [], "method", false, false, true, 53);
// line 54
$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", false, false, true, 54);
// line 55
$context["earliestProposedToDate"] = twig_get_attribute($this->env, $this->source, 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.', 55, $this->source); })()), "copy", [], "method", false, false, true, 55), "addDays", [7], "method", false, false, true, 55);
// line 56
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", false, false, true, 56)) {
// line 57
echo " <script type=\"text/javascript\" data-cookieconsent=\"ignore\">
_initialState.searchForm.from = '";
// line 58
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", null, true);
echo "';
_initialState.searchForm.to = '";
// line 59
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", null, true);
echo "';
</script>
";
}
// line 62
echo "<div class=\"custom-cursor js-custom-cursor\"></div>
</body>
</html>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "@ElementsDemiFrontend/Layout/layout.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("<!doctype html>
<html lang=\"{{ app.request.locale }}\">
<head>
<script>
/* ga mock function */
(function(i,s,r){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();
})(window,document,'ga');
</script>
{% if hasGetParams() or 'demi_checkout' in app.request.attributes.get('_route') %}
{% do elements_robots().setNoIndex(true) %}
{% endif %}
{{ include('@ElementsDemiFrontend/Includes/layout/head.html.twig') }}
{{ include('Layout/includes/codeHead.html.twig') }}
</head>
<body>
{% if not demi_core_configuration(\"getIsWhitelabel\", {}) and not editmode %}
{{ include('Navigation/navbar.html.twig') }}
{% endif %}
{% if demi_core_configuration(\"getIsWhitelabel\", {}) %}
{% do jsConfig().add('affiliate', true) %}
{% do jsConfig().add('affiliateTarget', '_blank') %}
<main id=\"main-content\" role=\"main\" class=\"content-block\">
{{ block('content') }}
</main>
{% else %}
<div class=\"main-content--spacing main-content--no-hero-small content-block\">
{{ block('content') }}
</div>
{% endif %}
{% if not editmode and document.property('modal_info') is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Snippet') %}
{{ pimcore_inc(document.property('modal_info')) }}
{% endif %}
{% if not demi_core_configuration(\"getIsWhitelabel\", {}) %}
{{ pimcore_inc(document.property('footer'), {footerStyleModifier: 'footer--has-smaller-padding content-block'}) }}
{% endif %}
{{ jsConfig() }}
{% if loadMerchJs is defined and loadMerchJs == true %}
{{ include('@ElementsDemiFrontend/Includes/layout/jsScriptsMerchandiseShop.html.twig') }}
{% elseif loadAdditionalServiceJs is defined and loadAdditionalServiceJs == true %}
{{ include('@ElementsDemiFrontend/Includes/layout/jsScriptsAdditionalService.html.twig') }}
{% else %}
{{ include('@ElementsDemiFrontend/Includes/layout/jsScripts.html.twig') }}
{% endif %}
{% set now = carbon().now() %}
{% set earliestProposedFromDate = carbon().createFromFormat('Y-m-d H:i:s', '2020-03-19 12:00:00') %}
{% set earliestProposedToDate = earliestProposedFromDate.copy().addDays(7) %}
{% if earliestProposedFromDate.gt(now) %}
<script type=\"text/javascript\" data-cookieconsent=\"ignore\">
_initialState.searchForm.from = '{{ elements_customDateFormat(earliestProposedFromDate) }}';
_initialState.searchForm.to = '{{ elements_customDateFormat(earliestProposedToDate) }}';
</script>
{% endif %}
<div class=\"custom-cursor js-custom-cursor\"></div>
</body>
</html>
", "@ElementsDemiFrontend/Layout/layout.html.twig", "/home/steiermark/www/src/Elements/Bundle/DemiFrontendBundle/Resources/views/Layout/layout.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 10, "do" => 11, "set" => 53);
static $filters = array("escape" => 2);
static $functions = array("hasGetParams" => 10, "elements_robots" => 11, "include" => 13, "demi_core_configuration" => 18, "jsConfig" => 22, "pimcore_inc" => 35, "carbon" => 53, "elements_customDateFormat" => 58);
try {
$this->sandbox->checkSecurity(
['if', 'do', 'set'],
['escape'],
['hasGetParams', 'elements_robots', 'include', 'demi_core_configuration', 'jsConfig', 'pimcore_inc', 'carbon', 'elements_customDateFormat']
);
} 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;
}
}
}