var/cache/dev/twig/b2/b2140982ff336220924f332e30b63a92.php line 35

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. /* includes/layout/header/widgets/page-header--widgets.html.twig */
  14. class __TwigTemplate_4dee2ca1e86f74946e541f6613e7cfb7 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", "includes/layout/header/widgets/page-header--widgets.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", "includes/layout/header/widgets/page-header--widgets.html.twig"));
  35.         // line 1
  36.         echo "
  37. ";
  38.         // line 2
  39.         if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 2, $this->source); })())) {
  40.             echo "<div class=\"page-header--widgets-container\">";
  41.         }
  42.         // line 3
  43.         echo "
  44.     ";
  45.         // line 4
  46.         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")) {
  47.             // line 5
  48.             echo "        ";
  49.             echo twig_include($this->env, $context, "includes/layout/header/widgets/widget-teaserslider.html.twig");
  50.             echo "
  51.     ";
  52.         }
  53.         // line 7
  54.         echo "
  55.     ";
  56.         // line 8
  57.         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")) {
  58.             // line 9
  59.             echo "        ";
  60.             if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 9, $this->source); })())) {
  61.                 // line 10
  62.                 echo "            ";
  63.                 echo twig_include($this->env, $context, "includes/layout/header/widgets/widget-booking.html.twig");
  64.                 echo "
  65.         ";
  66.             }
  67.             // line 12
  68.             echo "    ";
  69.         }
  70.         // line 13
  71.         echo "
  72.     ";
  73.         // line 14
  74.         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")) {
  75.             // line 15
  76.             echo "        ";
  77.             echo twig_include($this->env, $context, "includes/layout/header/widgets/widget-smallteasers.html.twig");
  78.             echo "
  79.     ";
  80.         }
  81.         // line 17
  82.         echo "
  83. ";
  84.         // line 18
  85.         if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 18, $this->source); })())) {
  86.             echo "</div>";
  87.         }
  88.         // line 19
  89.         echo "
  90. ";
  91.         // line 20
  92.         if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 20, $this->source); })())) {
  93.             // line 21
  94.             echo "    <div class=\"backend-settings backend-settings--widget\">
  95.         <div class=\"sub-setting\">
  96.             <label>Widgets</label>
  97.             <div class=\"setting\">
  98.                 ";
  99.             // line 25
  100.             if (twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "widget"), "isEmpty", [], "method", false, false, true, 25)) {
  101.                 // line 26
  102.                 echo "                    ";
  103.                 twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "widget"), "setDataFromResource", [0 => ""], "method", false, false, true, 26);
  104.                 // line 27
  105.                 echo "                ";
  106.             }
  107.             // line 28
  108.             echo "                ";
  109.             $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"]];
  110.             // line 34
  111.             echo "                ";
  112.             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")) {
  113.                 // line 35
  114.                 echo "                    ";
  115.                 $context["store"] = [0 => [0 => "widget-booking", 1 => "Booking Box"]];
  116.                 // line 36
  117.                 echo "                ";
  118.             }
  119.             // line 37
  120.             echo "                ";
  121.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "widget", ["store" =>             // line 38
  122. (isset($context["store"]) || array_key_exists("store", $context) ? $context["store"] : (function () { throw new RuntimeError('Variable "store" does not exist.', 38, $this->source); })()), "reload" => true]);
  123.             // line 40
  124.             echo "
  125.             </div>
  126.         </div>
  127.     </div>
  128. ";
  129.         }
  130.         
  131.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  132.         
  133.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  134.     }
  135.     public function getTemplateName()
  136.     {
  137.         return "includes/layout/header/widgets/page-header--widgets.html.twig";
  138.     }
  139.     public function isTraitable()
  140.     {
  141.         return false;
  142.     }
  143.     public function getDebugInfo()
  144.     {
  145.         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,);
  146.     }
  147.     public function getSourceContext()
  148.     {
  149.         return new Source("
  150. {% if editmode %}<div class=\"page-header--widgets-container\">{% endif %}
  151.     {% if pimcore_select('widget').getData() == 'widget-teaserslider' %}
  152.         {{ include('includes/layout/header/widgets/widget-teaserslider.html.twig') }}
  153.     {% endif %}
  154.     {% if pimcore_select('widget').getData() == 'widget-booking' %}
  155.         {% if not editmode %}
  156.             {{ include('includes/layout/header/widgets/widget-booking.html.twig') }}
  157.         {% endif %}
  158.     {% endif %}
  159.     {% if pimcore_select('widget').getData() == 'widget-smallteasers' %}
  160.         {{ include('includes/layout/header/widgets/widget-smallteasers.html.twig') }}
  161.     {% endif %}
  162. {% if editmode %}</div>{% endif %}
  163. {% if editmode %}
  164.     <div class=\"backend-settings backend-settings--widget\">
  165.         <div class=\"sub-setting\">
  166.             <label>Widgets</label>
  167.             <div class=\"setting\">
  168.                 {% if pimcore_select('widget').isEmpty() %}
  169.                     {% do pimcore_select('widget').setDataFromResource('') %}
  170.                 {% endif %}
  171.                 {% set store = [
  172.                     ['', 'Keines'],
  173.                     ['widget-teaserslider', 'Teaserslider'],
  174.                     ['widget-booking', 'Booking Box'],
  175.                     ['widget-smallteasers', 'Kleine Teaser']
  176.                 ] %}
  177.                 {% if document.getProperty('header') == 'V1' %}
  178.                     {% set store = [['widget-booking', 'Booking Box']] %}
  179.                 {% endif %}
  180.                 {{ pimcore_select('widget', {
  181.                     \"store\": store,
  182.                     \"reload\": true
  183.                 }) }}
  184.             </div>
  185.         </div>
  186.     </div>
  187. {% endif %}", "includes/layout/header/widgets/page-header--widgets.html.twig", "/html/pimcore/templates/includes/layout/header/widgets/page-header--widgets.html.twig");
  188.     }
  189.     
  190.     public function checkSecurity()
  191.     {
  192.         static $tags = array("if" => 2, "do" => 26, "set" => 28);
  193.         static $filters = array();
  194.         static $functions = array("pimcore_select" => 4, "include" => 5);
  195.         try {
  196.             $this->sandbox->checkSecurity(
  197.                 ['if', 'do', 'set'],
  198.                 [],
  199.                 ['pimcore_select', 'include']
  200.             );
  201.         } catch (SecurityError $e) {
  202.             $e->setSourceContext($this->source);
  203.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  204.                 $e->setTemplateLine($tags[$e->getTagName()]);
  205.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  206.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  207.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  208.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  209.             }
  210.             throw $e;
  211.         }
  212.     }
  213. }