var/cache/dev_h00fd8923ecf393ec0b25403e00167bec/twig/f0/f0e9bda817630d4962c886d640cc7627c31f348144202310e38d56d0a8869385.php line 39

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
  4. use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
  5. use Twig\Error\LoaderError;
  6. use Twig\Error\RuntimeError;
  7. use Twig\Extension\SandboxExtension;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. /* @Storefront/storefront/section/cms-section-block-container.html.twig */
  16. class __TwigTemplate_7f7ed83844cfe297d83d60a558478d73 extends Template
  17. {
  18.     private $source;
  19.     private $macros = [];
  20.     public function __construct(Environment $env)
  21.     {
  22.         parent::__construct($env);
  23.         $this->source $this->getSourceContext();
  24.         $this->parent false;
  25.         $this->blocks = [
  26.             'section_content_block' => [$this'block_section_content_block'],
  27.             'section_content_block_background_image' => [$this'block_section_content_block_background_image'],
  28.             'section_content_block_container' => [$this'block_section_content_block_container'],
  29.             'section_content_block_row' => [$this'block_section_content_block_row'],
  30.         ];
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/section/cms-section-block-container.html.twig"));
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/section/cms-section-block-container.html.twig"));
  39.         // line 1
  40.         $this->displayBlock('section_content_block'$context$blocks);
  41.         
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  43.         
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  45.     }
  46.     public function block_section_content_block($context, array $blocks = [])
  47.     {
  48.         $macros $this->macros;
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block"));
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block"));
  53.         // line 2
  54.         echo "
  55.     ";
  56.         // line 3
  57.         $context["top"] = ((sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "marginTop", [], "any"falsefalsefalse3)) ? (sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "marginTop", [], "any"falsefalsefalse3)) : (0));
  58.         // line 4
  59.         echo "    ";
  60.         $context["right"] = ((sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "marginRight", [], "any"falsefalsefalse4)) ? (sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "marginRight", [], "any"falsefalsefalse4)) : (0));
  61.         // line 5
  62.         echo "    ";
  63.         $context["bottom"] = ((sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "marginBottom", [], "any"falsefalsefalse5)) ? (sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "marginBottom", [], "any"falsefalsefalse5)) : (0));
  64.         // line 6
  65.         echo "    ";
  66.         $context["left"] = ((sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "marginLeft", [], "any"falsefalsefalse6)) ? (sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "marginLeft", [], "any"falsefalsefalse6)) : (0));
  67.         // line 7
  68.         echo "
  69.     ";
  70.         // line 8
  71.         if ((((($context["top"] ?? null) || ($context["right"] ?? null)) || ($context["bottom"] ?? null)) || ($context["left"] ?? null))) {
  72.             // line 9
  73.             echo "        ";
  74.             $context["padding"] = ((((((($context["top"] ?? null) . " ") . ($context["right"] ?? null)) . " ") . ($context["bottom"] ?? null)) . " ") . ($context["left"] ?? null));
  75.             // line 10
  76.             echo "    ";
  77.         }
  78.         // line 11
  79.         echo "
  80.     ";
  81.         // line 12
  82.         $context["blockBgColor"] = sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "backgroundColor", [], "any"falsefalsefalse12);
  83.         // line 13
  84.         echo "
  85.     ";
  86.         // line 14
  87.         $context["blockClasses"] = [=> sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "cssClass", [], "any"falsefalsefalse14), => ("pos-" sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "position", [], "any"falsefalsefalse14)), => ("cms-block-" sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "type", [], "any"falsefalsefalse14))];
  88.         // line 15
  89.         echo "
  90.     ";
  91.         // line 16
  92.         if (sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "backgroundMedia", [], "any"falsefalsefalse16)) {
  93.             // line 17
  94.             echo "        ";
  95.             $context["blockClasses"] = twig_array_merge([=> "bg-image"], ($context["blockClasses"] ?? null));
  96.             // line 18
  97.             echo "    ";
  98.         }
  99.         // line 19
  100.         echo "
  101.     ";
  102.         // line 20
  103.         if (($context["blockBgColor"] ?? null)) {
  104.             // line 21
  105.             echo "        ";
  106.             $context["blockClasses"] = twig_array_merge([=> "bg-color"], ($context["blockClasses"] ?? null));
  107.             // line 22
  108.             echo "    ";
  109.         }
  110.         // line 23
  111.         echo "
  112.     ";
  113.         // line 24
  114.         $context["columns"] = 3;
  115.         // line 25
  116.         echo "    ";
  117.         $context["isInSidebar"] = (sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "sectionPosition", [], "any"falsefalsefalse25) == "sidebar");
  118.         // line 26
  119.         echo "    ";
  120.         $context["sidebarClasses"] = "";
  121.         // line 27
  122.         echo "
  123.     ";
  124.         // line 28
  125.         if ((($context["isInSidebar"] ?? null) == true)) {
  126.             // line 29
  127.             echo "        ";
  128.             $context["sidebarClasses"] = "has--sidebar";
  129.             // line 30
  130.             echo "    ";
  131.         }
  132.         // line 31
  133.         echo "
  134.     ";
  135.         // line 32
  136.         if ((null === sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "visibility", [], "any"falsefalsefalse32))) {
  137.             // line 33
  138.             echo "        ";
  139.             $context["visibility"] = ["mobile" => true"tablet" => true"desktop" => true];
  140.             // line 38
  141.             echo "    ";
  142.         } else {
  143.             // line 39
  144.             echo "        ";
  145.             $context["visibility"] = sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "visibility", [], "any"falsefalsefalse39);
  146.             // line 40
  147.             echo "    ";
  148.         }
  149.         // line 41
  150.         echo "
  151.     ";
  152.         // line 42
  153.         if ( !sw_get_attribute($this->env$this->source, ($context["visibility"] ?? null), "mobile", [], "any"falsefalsefalse42)) {
  154.             // line 43
  155.             echo "        ";
  156.             $context["blockClasses"] = twig_array_merge([=> "hidden-mobile"], ($context["blockClasses"] ?? null));
  157.             // line 44
  158.             echo "    ";
  159.         }
  160.         // line 45
  161.         echo "    ";
  162.         if ( !sw_get_attribute($this->env$this->source, ($context["visibility"] ?? null), "tablet", [], "any"falsefalsefalse45)) {
  163.             // line 46
  164.             echo "        ";
  165.             $context["blockClasses"] = twig_array_merge([=> "hidden-tablet"], ($context["blockClasses"] ?? null));
  166.             // line 47
  167.             echo "    ";
  168.         }
  169.         // line 48
  170.         echo "    ";
  171.         if ( !sw_get_attribute($this->env$this->source, ($context["visibility"] ?? null), "desktop", [], "any"falsefalsefalse48)) {
  172.             // line 49
  173.             echo "        ";
  174.             $context["blockClasses"] = twig_array_merge([=> "hidden-desktop"], ($context["blockClasses"] ?? null));
  175.             // line 50
  176.             echo "    ";
  177.         }
  178.         // line 51
  179.         echo "
  180.     <div class=\"cms-block ";
  181.         // line 52
  182.         echo sw_escape_filter($this->envtwig_join_filter(($context["blockClasses"] ?? null), " "), "html"nulltrue);
  183.         echo "\"
  184.          style=\"";
  185.         // line 53
  186.         if (($context["blockBgColor"] ?? null)) {
  187.             echo " background-color: ";
  188.             echo sw_escape_filter($this->env, ($context["blockBgColor"] ?? null), "html"nulltrue);
  189.             echo ";";
  190.         }
  191.         echo "\">
  192.         ";
  193.         // line 54
  194.         $this->displayBlock('section_content_block_background_image'$context$blocks);
  195.         // line 64
  196.         echo "
  197.         ";
  198.         // line 65
  199.         $this->displayBlock('section_content_block_container'$context$blocks);
  200.         // line 76
  201.         echo "    </div>
  202. ";
  203.         
  204.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  205.         
  206.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  207.     }
  208.     // line 54
  209.     public function block_section_content_block_background_image($context, array $blocks = [])
  210.     {
  211.         $macros $this->macros;
  212.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  213.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block_background_image"));
  214.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  215.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block_background_image"));
  216.         // line 55
  217.         echo "            ";
  218.         if (sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "backgroundMedia", [], "any"falsefalsefalse55)) {
  219.             // line 56
  220.             echo "                ";
  221.             ((function () use ($context$blocks) {
  222.                 $finder $this->env->getExtension('Shopware\Core\Framework\Adapter\Twig\Extension\NodeExtension')->getFinder();
  223.                 $includeTemplate $finder->find("@Storefront/storefront/utilities/thumbnail.html.twig");
  224.                 return $this->loadTemplate($includeTemplate ?? null"@Storefront/storefront/section/cms-section-block-container.html.twig"56);
  225.             })())->display(twig_array_merge($context, ["media" => sw_get_attribute($this->env$this->source,             // line 57
  226. ($context["block"] ?? null), "backgroundMedia", [], "any"falsefalsefalse57), "attributes" => ["class" => ("cms-block-background media-mode--" sw_get_attribute($this->env$this->source,             // line 59
  227. ($context["block"] ?? null), "backgroundMediaMode", [], "any"falsefalsefalse59))], "name" => "cms-block-background"]));
  228.             // line 62
  229.             echo "            ";
  230.         }
  231.         // line 63
  232.         echo "        ";
  233.         
  234.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  235.         
  236.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  237.     }
  238.     // line 65
  239.     public function block_section_content_block_container($context, array $blocks = [])
  240.     {
  241.         $macros $this->macros;
  242.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  243.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block_container"));
  244.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  245.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block_container"));
  246.         // line 66
  247.         echo "            <div class=\"cms-block-container\"
  248.                  style=\"";
  249.         // line 67
  250.         if (($context["padding"] ?? null)) {
  251.             echo "padding: ";
  252.             echo sw_escape_filter($this->env, ($context["padding"] ?? null), "html"nulltrue);
  253.             echo ";";
  254.         }
  255.         echo "\">
  256.                 ";
  257.         // line 69
  258.         $this->displayBlock('section_content_block_row'$context$blocks);
  259.         // line 74
  260.         echo "            </div>
  261.         ";
  262.         
  263.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  264.         
  265.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  266.     }
  267.     // line 69
  268.     public function block_section_content_block_row($context, array $blocks = [])
  269.     {
  270.         $macros $this->macros;
  271.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  272.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block_row"));
  273.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  274.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block_row"));
  275.         // line 70
  276.         echo "                    <div class=\"cms-block-container-row row cms-row ";
  277.         echo sw_escape_filter($this->env, ($context["sidebarClasses"] ?? null), "html"nulltrue);
  278.         echo "\">
  279.                         ";
  280.         // line 71
  281.         $__internal_compile_0 null;
  282.         try {
  283.             $__internal_compile_0 =             ((function () use ($context$blocks) {
  284.                 $finder $this->env->getExtension('Shopware\Core\Framework\Adapter\Twig\Extension\NodeExtension')->getFinder();
  285.                 $includeTemplate $finder->find((("@Storefront/storefront/block/cms-block-" sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "type", [], "any"falsefalsefalse71)) . ".html.twig"));
  286.                 return $this->loadTemplate($includeTemplate ?? null"@Storefront/storefront/section/cms-section-block-container.html.twig"71);
  287.             })());
  288.         } catch (LoaderError $e) {
  289.             // ignore missing template
  290.         }
  291.         if ($__internal_compile_0) {
  292.             $__internal_compile_0->display($context);
  293.         }
  294.         // line 72
  295.         echo "                    </div>
  296.                 ";
  297.         
  298.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  299.         
  300.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  301.     }
  302.     public function getTemplateName()
  303.     {
  304.         return "@Storefront/storefront/section/cms-section-block-container.html.twig";
  305.     }
  306.     public function getDebugInfo()
  307.     {
  308.         return array (  327 => 72,  311 => 71,  306 => 70,  296 => 69,  285 => 74,  283 => 69,  274 => 67,  271 => 66,  261 => 65,  251 => 63,  248 => 62,  246 => 59,  245 => 57,  237 => 56,  234 => 55,  224 => 54,  213 => 76,  211 => 65,  208 => 64,  206 => 54,  198 => 53,  194 => 52,  191 => 51,  188 => 50,  185 => 49,  182 => 48,  179 => 47,  176 => 46,  173 => 45,  170 => 44,  167 => 43,  165 => 42,  162 => 41,  159 => 40,  156 => 39,  153 => 38,  150 => 33,  148 => 32,  145 => 31,  142 => 30,  139 => 29,  137 => 28,  134 => 27,  131 => 26,  128 => 25,  126 => 24,  123 => 23,  120 => 22,  117 => 21,  115 => 20,  112 => 19,  109 => 18,  106 => 17,  104 => 16,  101 => 15,  99 => 14,  96 => 13,  94 => 12,  91 => 11,  88 => 10,  85 => 9,  83 => 8,  80 => 7,  77 => 6,  74 => 5,  71 => 4,  69 => 3,  66 => 2,  47 => 1,);
  309.     }
  310.     public function getSourceContext()
  311.     {
  312.         return new Source("{% block section_content_block %}
  313.     {% set top = block.marginTop ? block.marginTop : 0 %}
  314.     {% set right = block.marginRight ? block.marginRight : 0 %}
  315.     {% set bottom = block.marginBottom ? block.marginBottom : 0 %}
  316.     {% set left = block.marginLeft ? block.marginLeft : 0 %}
  317.     {% if top or right or bottom or left %}
  318.         {% set padding = top ~ \" \" ~ right ~ \" \" ~ bottom ~ \" \" ~ left %}
  319.     {% endif %}
  320.     {% set blockBgColor = block.backgroundColor %}
  321.     {% set blockClasses = [block.cssClass, 'pos-' ~ block.position, 'cms-block-' ~ block.type] %}
  322.     {% if block.backgroundMedia %}
  323.         {% set blockClasses = ['bg-image']|merge(blockClasses) %}
  324.     {% endif %}
  325.     {% if blockBgColor %}
  326.         {% set blockClasses = ['bg-color']|merge(blockClasses) %}
  327.     {% endif %}
  328.     {% set columns = 3 %}
  329.     {% set isInSidebar = block.sectionPosition == 'sidebar' %}
  330.     {% set sidebarClasses = '' %}
  331.     {% if isInSidebar == true %}
  332.         {% set sidebarClasses = 'has--sidebar' %}
  333.     {% endif %}
  334.     {% if block.visibility is null %}
  335.         {% set visibility = {
  336.             mobile: true,
  337.             tablet: true,
  338.             desktop: true
  339.         } %}
  340.     {% else %}
  341.         {% set visibility = block.visibility %}
  342.     {% endif %}
  343.     {% if not visibility.mobile %}
  344.         {% set blockClasses = ['hidden-mobile']|merge(blockClasses) %}
  345.     {% endif %}
  346.     {% if not visibility.tablet %}
  347.         {% set blockClasses = ['hidden-tablet']|merge(blockClasses) %}
  348.     {% endif %}
  349.     {% if not visibility.desktop %}
  350.         {% set blockClasses = ['hidden-desktop']|merge(blockClasses) %}
  351.     {% endif %}
  352.     <div class=\"cms-block {{ blockClasses|join(' ') }}\"
  353.          style=\"{% if blockBgColor %} background-color: {{ blockBgColor }};{% endif %}\">
  354.         {% block section_content_block_background_image %}
  355.             {% if block.backgroundMedia %}
  356.                 {% sw_thumbnails 'cms-block-background' with {
  357.                     media: block.backgroundMedia,
  358.                     attributes: {
  359.                         class: \"cms-block-background media-mode--\" ~ block.backgroundMediaMode
  360.                     }
  361.                     } %}
  362.             {% endif %}
  363.         {% endblock %}
  364.         {% block section_content_block_container %}
  365.             <div class=\"cms-block-container\"
  366.                  style=\"{% if padding %}padding: {{ padding }};{% endif %}\">
  367.                 {% block section_content_block_row %}
  368.                     <div class=\"cms-block-container-row row cms-row {{ sidebarClasses }}\">
  369.                         {% sw_include \"@Storefront/storefront/block/cms-block-\" ~ block.type ~ \".html.twig\" ignore missing %}
  370.                     </div>
  371.                 {% endblock %}
  372.             </div>
  373.         {% endblock %}
  374.     </div>
  375. {% endblock %}
  376. ""@Storefront/storefront/section/cms-section-block-container.html.twig""/var/www/shopware6/vendor/shopware/storefront/Resources/views/storefront/section/cms-section-block-container.html.twig");
  377.     }
  378. }