<?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;
/* includes/layout/header/widgets/page-header--widgets.html.twig */
class __TwigTemplate_4dee2ca1e86f74946e541f6613e7cfb7 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", "includes/layout/header/widgets/page-header--widgets.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/layout/header/widgets/page-header--widgets.html.twig"));
// line 1
echo "
";
// line 2
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 2, $this->source); })())) {
echo "<div class=\"page-header--widgets-container\">";
}
// line 3
echo "
";
// line 4
if ((twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "widget"), "getData", [], "method", false, false, true, 4) == "widget-teaserslider")) {
// line 5
echo " ";
echo twig_include($this->env, $context, "includes/layout/header/widgets/widget-teaserslider.html.twig");
echo "
";
}
// line 7
echo "
";
// line 8
if ((twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "widget"), "getData", [], "method", false, false, true, 8) == "widget-booking")) {
// line 9
echo " ";
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 9, $this->source); })())) {
// line 10
echo " ";
echo twig_include($this->env, $context, "includes/layout/header/widgets/widget-booking.html.twig");
echo "
";
}
// line 12
echo " ";
}
// line 13
echo "
";
// line 14
if ((twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "widget"), "getData", [], "method", false, false, true, 14) == "widget-smallteasers")) {
// line 15
echo " ";
echo twig_include($this->env, $context, "includes/layout/header/widgets/widget-smallteasers.html.twig");
echo "
";
}
// line 17
echo "
";
// line 18
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 18, $this->source); })())) {
echo "</div>";
}
// line 19
echo "
";
// line 20
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 20, $this->source); })())) {
// line 21
echo " <div class=\"backend-settings backend-settings--widget\">
<div class=\"sub-setting\">
<label>Widgets</label>
<div class=\"setting\">
";
// line 25
if (twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "widget"), "isEmpty", [], "method", false, false, true, 25)) {
// line 26
echo " ";
twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "widget"), "setDataFromResource", [0 => ""], "method", false, false, true, 26);
// line 27
echo " ";
}
// line 28
echo " ";
$context["store"] = [0 => [0 => "", 1 => "Keines"], 1 => [0 => "widget-teaserslider", 1 => "Teaserslider"], 2 => [0 => "widget-booking", 1 => "Booking Box"], 3 => [0 => "widget-smallteasers", 1 => "Kleine Teaser"]];
// line 34
echo " ";
if ((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); })()), "getProperty", [0 => "header"], "method", false, false, true, 34) == "V1")) {
// line 35
echo " ";
$context["store"] = [0 => [0 => "widget-booking", 1 => "Booking Box"]];
// line 36
echo " ";
}
// line 37
echo " ";
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "widget", ["store" => // line 38
(isset($context["store"]) || array_key_exists("store", $context) ? $context["store"] : (function () { throw new RuntimeError('Variable "store" does not exist.', 38, $this->source); })()), "reload" => true]);
// line 40
echo "
</div>
</div>
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "includes/layout/header/widgets/page-header--widgets.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 133 => 40, 131 => 38, 129 => 37, 126 => 36, 123 => 35, 120 => 34, 117 => 28, 114 => 27, 111 => 26, 109 => 25, 103 => 21, 101 => 20, 98 => 19, 94 => 18, 91 => 17, 85 => 15, 83 => 14, 80 => 13, 77 => 12, 71 => 10, 68 => 9, 66 => 8, 63 => 7, 57 => 5, 55 => 4, 52 => 3, 48 => 2, 45 => 1,);
}
public function getSourceContext()
{
return new Source("
{% if editmode %}<div class=\"page-header--widgets-container\">{% endif %}
{% if pimcore_select('widget').getData() == 'widget-teaserslider' %}
{{ include('includes/layout/header/widgets/widget-teaserslider.html.twig') }}
{% endif %}
{% if pimcore_select('widget').getData() == 'widget-booking' %}
{% if not editmode %}
{{ include('includes/layout/header/widgets/widget-booking.html.twig') }}
{% endif %}
{% endif %}
{% if pimcore_select('widget').getData() == 'widget-smallteasers' %}
{{ include('includes/layout/header/widgets/widget-smallteasers.html.twig') }}
{% endif %}
{% if editmode %}</div>{% endif %}
{% if editmode %}
<div class=\"backend-settings backend-settings--widget\">
<div class=\"sub-setting\">
<label>Widgets</label>
<div class=\"setting\">
{% if pimcore_select('widget').isEmpty() %}
{% do pimcore_select('widget').setDataFromResource('') %}
{% endif %}
{% set store = [
['', 'Keines'],
['widget-teaserslider', 'Teaserslider'],
['widget-booking', 'Booking Box'],
['widget-smallteasers', 'Kleine Teaser']
] %}
{% if document.getProperty('header') == 'V1' %}
{% set store = [['widget-booking', 'Booking Box']] %}
{% endif %}
{{ pimcore_select('widget', {
\"store\": store,
\"reload\": true
}) }}
</div>
</div>
</div>
{% endif %}", "includes/layout/header/widgets/page-header--widgets.html.twig", "/html/pimcore/templates/includes/layout/header/widgets/page-header--widgets.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 2, "do" => 26, "set" => 28);
static $filters = array();
static $functions = array("pimcore_select" => 4, "include" => 5);
try {
$this->sandbox->checkSecurity(
['if', 'do', 'set'],
[],
['pimcore_select', '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;
}
}
}