var/cache/dev_h35c9e4fa64367e5a564f83803cfdec08/twig/d5/d56dd0466e2f0685e7f835cc0464edb956efd8c119d5fbfb78c37cf2a06923b1.php line 40

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. /* @TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig */
  16. class __TwigTemplate_3eb9fd9a172fe577da1587b003cad509 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->blocks = [
  25.             'section_content_block' => [$this'block_section_content_block'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 2
  31.         return "@Storefront/storefront/section/cms-section-block-container.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig"));
  40.         // line 8
  41.         $context["twtProductDetailCrossSellingShow"] = $this->extensions['Shopware\Storefront\Framework\Twig\Extension\ConfigExtension']->theme($context"twt-product-detail-cross-selling-show");
  42.         // line 2
  43.         $this->parent $this->loadTemplate("@Storefront/storefront/section/cms-section-block-container.html.twig""@TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig"2);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 14
  51.     public function block_section_content_block($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""section_content_block"));
  58.         // line 15
  59.         echo "    ";
  60.         $context["showBlock"] = true;
  61.         // line 16
  62.         echo "    
  63.     ";
  64.         // line 18
  65.         echo "    ";
  66.         if (((sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "type", [], "any"falsefalsefalse18) == "cross-selling") && (($context["twtProductDetailCrossSellingShow"] ?? null) == 1))) {
  67.             // line 19
  68.             echo "        ";
  69.             $context['_parent'] = $context;
  70.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "slots", [], "any"falsefalsefalse19));
  71.             foreach ($context['_seq'] as $context["_key"] => $context["element"]) {
  72.                 // line 20
  73.                 echo "            ";
  74.                 // line 21
  75.                 echo "            ";
  76.                 if ((sw_get_attribute($this->env$this->source$context["element"], "type", [], "any"falsefalsefalse21) == "cross-selling")) {
  77.                     // line 22
  78.                     echo "                ";
  79.                     if ( !twig_test_empty(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source$context["element"], "data", [], "any"falsefalsefalse22), "crossSellings", [], "any"falsefalsefalse22))) {
  80.                         echo " ";
  81.                         // line 23
  82.                         echo "                    ";
  83.                         // line 24
  84.                         echo "                    ";
  85.                         $context["showBlock"] = true;
  86.                         // line 25
  87.                         echo "                ";
  88.                     } else {
  89.                         // line 26
  90.                         echo "                    ";
  91.                         // line 27
  92.                         echo "                    ";
  93.                         $context["showBlock"] = false;
  94.                         // line 28
  95.                         echo "                ";
  96.                     }
  97.                     // line 29
  98.                     echo "            ";
  99.                 } else {
  100.                     // line 30
  101.                     echo "                ";
  102.                     // line 31
  103.                     echo "                ";
  104.                     $context["showBlock"] = true;
  105.                     // line 32
  106.                     echo "            ";
  107.                 }
  108.                 // line 33
  109.                 echo "        ";
  110.             }
  111.             $_parent $context['_parent'];
  112.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['element'], $context['_parent'], $context['loop']);
  113.             $context array_intersect_key($context$_parent) + $_parent;
  114.             // line 34
  115.             echo "    ";
  116.         }
  117.         // line 35
  118.         echo "    
  119.     ";
  120.         // line 37
  121.         echo "    ";
  122.         if ((sw_get_attribute($this->env$this->source, ($context["block"] ?? null), "type", [], "any"falsefalsefalse37) == "twt-listing-subcategories")) {
  123.             // line 38
  124.             echo "        ";
  125.             // line 39
  126.             echo "        ";
  127.             if ((twig_test_empty(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "header", [], "any"falsefalsefalse39), "navigation", [], "any"falsefalsefalse39), "active", [], "any"falsefalsefalse39), "childCount", [], "any"falsefalsefalse39)) || (sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "header", [], "any"falsefalsefalse39), "navigation", [], "any"falsefalsefalse39), "active", [], "any"falsefalsefalse39), "childCount", [], "any"falsefalsefalse39) == 0))) {
  128.                 // line 40
  129.                 echo "            ";
  130.                 // line 41
  131.                 echo "            ";
  132.                 $context["showBlock"] = false;
  133.                 // line 42
  134.                 echo "        ";
  135.             }
  136.             // line 43
  137.             echo "    ";
  138.         }
  139.         // line 44
  140.         echo "    
  141.     ";
  142.         // line 45
  143.         if (($context["showBlock"] ?? null)) {
  144.             // line 46
  145.             echo "        ";
  146.             // line 47
  147.             echo "        ";
  148.             $this->displayParentBlock("section_content_block"$context$blocks);
  149.             echo "
  150.     ";
  151.         }
  152.         
  153.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  154.         
  155.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  156.     }
  157.     public function getTemplateName()
  158.     {
  159.         return "@TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig";
  160.     }
  161.     public function isTraitable()
  162.     {
  163.         return false;
  164.     }
  165.     public function getDebugInfo()
  166.     {
  167.         return array (  159 => 47,  157 => 46,  155 => 45,  152 => 44,  149 => 43,  146 => 42,  143 => 41,  141 => 40,  138 => 39,  136 => 38,  133 => 37,  130 => 35,  127 => 34,  121 => 33,  118 => 32,  115 => 31,  113 => 30,  110 => 29,  107 => 28,  104 => 27,  102 => 26,  99 => 25,  96 => 24,  94 => 23,  90 => 22,  87 => 21,  85 => 20,  80 => 19,  77 => 18,  74 => 16,  71 => 15,  61 => 14,  50 => 2,  48 => 8,  35 => 2,);
  168.     }
  169.     public function getSourceContext()
  170.     {
  171.         return new Source("{% sw_extends '@Storefront/storefront/section/cms-section-block-container.html.twig' %}
  172. {# TODO: prüfen... #}
  173. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  174. {# ThemeWare: Set theme variables #}
  175. {% set twtProductDetailCrossSellingShow = theme_config('twt-product-detail-cross-selling-show') %}
  176. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  177. {# TODO: HC-Architecture..! #}
  178. {# ThemeWare: Delete blocks if they are empty #}
  179. {% block section_content_block %}
  180.     {% set showBlock = true %}
  181.     
  182.     {# ThemeWare: Check if 'Cross Selling' block is used #}
  183.     {% if block.type == 'cross-selling' and twtProductDetailCrossSellingShow == 1 %}
  184.         {% for element in block.slots %}
  185.             {# ThemeWare: Check if 'Cross Selling' element is available #}
  186.             {% if element.type == 'cross-selling' %}
  187.                 {% if element.data.crossSellings is not empty %} {# element.data.crossSellings.elements #}
  188.                     {# ThemeWare: 'Cross Selling' element available and NOT empty = show block #}
  189.                     {% set showBlock = true %}
  190.                 {% else %}
  191.                     {# ThemeWare: 'Cross Selling' element available but empty = hide block #}
  192.                     {% set showBlock = false %}
  193.                 {% endif %}
  194.             {% else %}
  195.                 {# ThemeWare: Not a 'Cross Selling' element #}
  196.                 {% set showBlock = true %}
  197.             {% endif %}
  198.         {% endfor %}
  199.     {% endif %}
  200.     
  201.     {# ThemeWare: Check if 'listing subcategories' block is used #}
  202.     {% if block.type == 'twt-listing-subcategories' %}
  203.         {# ThemeWare: Check if subcategories existing #}
  204.         {% if page.header.navigation.active.childCount is empty or page.header.navigation.active.childCount == 0 %}
  205.             {# ThemeWare: No subcategories existing = hide block #}
  206.             {% set showBlock = false %}
  207.         {% endif %}
  208.     {% endif %}
  209.     
  210.     {% if showBlock %}
  211.         {# Default block = show block #}
  212.         {{ parent() }}
  213.     {% endif %}
  214. {% endblock %}""@TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig""/var/customers/webs/kew/htdocs6/custom/plugins/TcinnThemeWareModern/src/Resources/views/storefront/section/cms-section-block-container.html.twig");
  215.     }
  216. }