var/cache/dev_h00fd8923ecf393ec0b25403e00167bec/twig/69/6961c56f67adfa7053476f78c8e07b75561cc4c155b890fbd1c937c15dc9fe4d.php line 191

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. /* @econdWebAnalytics/storefront/page/content/detail.html.twig */
  16. class __TwigTemplate_921de5f36a85790dee9fdeecb1da270c 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.             'page_content_sections_inner' => [$this'block_page_content_sections_inner'],
  26.             'page_content_section' => [$this'block_page_content_section'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 2
  32.         return "@Storefront/storefront/page/content/detail.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@econdWebAnalytics/storefront/page/content/detail.html.twig"));
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@econdWebAnalytics/storefront/page/content/detail.html.twig"));
  41.         $this->parent $this->loadTemplate("@Storefront/storefront/page/content/detail.html.twig""@econdWebAnalytics/storefront/page/content/detail.html.twig"2);
  42.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  45.         
  46.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  47.     }
  48.     // line 5
  49.     public function block_page_content_sections_inner($context, array $blocks = [])
  50.     {
  51.         $macros $this->macros;
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_content_sections_inner"));
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_content_sections_inner"));
  56.         // line 6
  57.         echo "    <div class=\"cms-sections\">
  58.         ";
  59.         // line 7
  60.         $context['_parent'] = $context;
  61.         $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->source, ($context["cmsPage"] ?? null), "sections", [], "any"falsefalsefalse7));
  62.         $context['loop'] = [
  63.           'parent' => $context['_parent'],
  64.           'index0' => 0,
  65.           'index'  => 1,
  66.           'first'  => true,
  67.         ];
  68.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  69.             $length count($context['_seq']);
  70.             $context['loop']['revindex0'] = $length 1;
  71.             $context['loop']['revindex'] = $length;
  72.             $context['loop']['length'] = $length;
  73.             $context['loop']['last'] = === $length;
  74.         }
  75.         foreach ($context['_seq'] as $context["_key"] => $context["section"]) {
  76.             // line 8
  77.             echo "            ";
  78.             $context["sectionBgColor"] = sw_get_attribute($this->env$this->source$context["section"], "backgroundColor", [], "any"falsefalsefalse8);
  79.             // line 9
  80.             echo "            ";
  81.             $context["sectionBgImg"] = $this->extensions['Shopware\Storefront\Framework\Twig\Extension\UrlEncodingTwigFilter']->encodeMediaUrl(sw_get_attribute($this->env$this->source$context["section"], "backgroundMedia", [], "any"falsefalsefalse9));
  82.             // line 10
  83.             echo "            ";
  84.             $context["sectionBgImgMode"] = sw_get_attribute($this->env$this->source$context["section"], "backgroundMediaMode", [], "any"falsefalsefalse10);
  85.             // line 11
  86.             echo "            ";
  87.             $context["sectionClasses"] = [=> sw_get_attribute($this->env$this->source$context["section"], "cssClass", [], "any"falsefalsefalse11), => ("pos-" sw_get_attribute($this->env$this->source$context["section"], "position", [], "any"falsefalsefalse11)), => ("cms-section-" sw_get_attribute($this->env$this->source$context["section"], "type", [], "any"falsefalsefalse11))];
  88.             // line 12
  89.             echo "            ";
  90.             if (($context["sectionBgImg"] ?? null)) {
  91.                 // line 13
  92.                 echo "                ";
  93.                 $context["sectionClasses"] = twig_array_merge([=> "bg-image"], ($context["sectionClasses"] ?? null));
  94.                 // line 14
  95.                 echo "            ";
  96.             }
  97.             // line 15
  98.             echo "            ";
  99.             if (($context["sectionBgColor"] ?? null)) {
  100.                 // line 16
  101.                 echo "                ";
  102.                 $context["sectionClasses"] = twig_array_merge([=> "bg-color"], ($context["sectionClasses"] ?? null));
  103.                 // line 17
  104.                 echo "            ";
  105.             }
  106.             // line 18
  107.             echo "            ";
  108.             if ((null === sw_get_attribute($this->env$this->source$context["section"], "visibility", [], "any"falsefalsefalse18))) {
  109.                 // line 19
  110.                 echo "                ";
  111.                 $context["visibility"] = ["mobile" => true"tablet" => true"desktop" => true];
  112.                 // line 24
  113.                 echo "            ";
  114.             } else {
  115.                 // line 25
  116.                 echo "                ";
  117.                 $context["visibility"] = sw_get_attribute($this->env$this->source$context["section"], "visibility", [], "any"falsefalsefalse25);
  118.                 // line 26
  119.                 echo "            ";
  120.             }
  121.             // line 27
  122.             echo "            ";
  123.             if ( !sw_get_attribute($this->env$this->source, ($context["visibility"] ?? null), "mobile", [], "any"falsefalsefalse27)) {
  124.                 // line 28
  125.                 echo "                ";
  126.                 $context["sectionClasses"] = twig_array_merge([=> "hidden-mobile"], ($context["sectionClasses"] ?? null));
  127.                 // line 29
  128.                 echo "            ";
  129.             }
  130.             // line 30
  131.             echo "            ";
  132.             if ( !sw_get_attribute($this->env$this->source, ($context["visibility"] ?? null), "tablet", [], "any"falsefalsefalse30)) {
  133.                 // line 31
  134.                 echo "                ";
  135.                 $context["sectionClasses"] = twig_array_merge([=> "hidden-tablet"], ($context["sectionClasses"] ?? null));
  136.                 // line 32
  137.                 echo "            ";
  138.             }
  139.             // line 33
  140.             echo "            ";
  141.             if ( !sw_get_attribute($this->env$this->source, ($context["visibility"] ?? null), "desktop", [], "any"falsefalsefalse33)) {
  142.                 // line 34
  143.                 echo "                ";
  144.                 $context["sectionClasses"] = twig_array_merge([=> "hidden-desktop"], ($context["sectionClasses"] ?? null));
  145.                 // line 35
  146.                 echo "            ";
  147.             }
  148.             // line 36
  149.             echo "            ";
  150.             $this->displayBlock('page_content_section'$context$blocks);
  151.             // line 42
  152.             echo "        ";
  153.             ++$context['loop']['index0'];
  154.             ++$context['loop']['index'];
  155.             $context['loop']['first'] = false;
  156.             if (isset($context['loop']['length'])) {
  157.                 --$context['loop']['revindex0'];
  158.                 --$context['loop']['revindex'];
  159.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  160.             }
  161.         }
  162.         $_parent $context['_parent'];
  163.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['section'], $context['_parent'], $context['loop']);
  164.         $context array_intersect_key($context$_parent) + $_parent;
  165.         // line 43
  166.         echo "    </div>
  167. ";
  168.         
  169.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  170.         
  171.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  172.     }
  173.     // line 36
  174.     public function block_page_content_section($context, array $blocks = [])
  175.     {
  176.         $macros $this->macros;
  177.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  178.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_content_section"));
  179.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  180.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_content_section"));
  181.         // line 37
  182.         echo "                <div class=\"cms-section ";
  183.         echo sw_escape_filter($this->envtwig_join_filter(($context["sectionClasses"] ?? null), " "), "html"nulltrue);
  184.         echo "\"
  185.                      style=\"";
  186.         // line 38
  187.         if (($context["sectionBgColor"] ?? null)) {
  188.             echo "background-color: ";
  189.             echo sw_escape_filter($this->env, ($context["sectionBgColor"] ?? null), "html"nulltrue);
  190.             echo ";";
  191.         }
  192.         if (($context["sectionBgImg"] ?? null)) {
  193.             echo "background-image: url(";
  194.             echo sw_escape_filter($this->env, ($context["sectionBgImg"] ?? null), "html"nulltrue);
  195.             echo ");background-size: ";
  196.             echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["section"] ?? null), "backgroundMediaMode", [], "any"falsefalsefalse38), "html"nulltrue);
  197.             echo ";";
  198.         }
  199.         echo "\">
  200.                     ";
  201.         // line 39
  202.         ((function () use ($context$blocks) {
  203.             $finder $this->env->getExtension('Shopware\Core\Framework\Adapter\Twig\Extension\NodeExtension')->getFinder();
  204.             $includeTemplate $finder->find((("@Storefront/storefront/section/cms-section-" sw_get_attribute($this->env$this->source, ($context["section"] ?? null), "type", [], "any"falsefalsefalse39)) . ".html.twig"));
  205.             return $this->loadTemplate($includeTemplate ?? null"@econdWebAnalytics/storefront/page/content/detail.html.twig"39);
  206.         })())->display($context);
  207.         // line 40
  208.         echo "                </div>
  209.             ";
  210.         
  211.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  212.         
  213.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  214.     }
  215.     public function getTemplateName()
  216.     {
  217.         return "@econdWebAnalytics/storefront/page/content/detail.html.twig";
  218.     }
  219.     public function isTraitable()
  220.     {
  221.         return false;
  222.     }
  223.     public function getDebugInfo()
  224.     {
  225.         return array (  227 => 40,  219 => 39,  204 => 38,  199 => 37,  189 => 36,  178 => 43,  164 => 42,  161 => 36,  158 => 35,  155 => 34,  152 => 33,  149 => 32,  146 => 31,  143 => 30,  140 => 29,  137 => 28,  134 => 27,  131 => 26,  128 => 25,  125 => 24,  122 => 19,  119 => 18,  116 => 17,  113 => 16,  110 => 15,  107 => 14,  104 => 13,  101 => 12,  98 => 11,  95 => 10,  92 => 9,  89 => 8,  72 => 7,  69 => 6,  59 => 5,  36 => 2,);
  226.     }
  227.     public function getSourceContext()
  228.     {
  229.         return new Source("{% sw_extends '@Storefront/storefront/page/content/detail.html.twig' %}
  230. {# @var cmsPage \\Shopware\\Core\\Content\\Cms\\CmsPageEntity #}
  231. {# @var landingPage \\Shopware\\Core\\Content\\LandingPage\\LandingPageEntity #}
  232. {% block page_content_sections_inner %}
  233.     <div class=\"cms-sections\">
  234.         {% for section in cmsPage.sections %}
  235.             {% set sectionBgColor = section.backgroundColor %}
  236.             {% set sectionBgImg = section.backgroundMedia|sw_encode_media_url %}
  237.             {% set sectionBgImgMode = section.backgroundMediaMode %}
  238.             {% set sectionClasses = [section.cssClass, 'pos-' ~ section.position, 'cms-section-' ~ section.type] %}
  239.             {% if sectionBgImg %}
  240.                 {% set sectionClasses = ['bg-image']|merge(sectionClasses) %}
  241.             {% endif %}
  242.             {% if sectionBgColor %}
  243.                 {% set sectionClasses = ['bg-color']|merge(sectionClasses) %}
  244.             {% endif %}
  245.             {% if section.visibility is null %}
  246.                 {% set visibility = {
  247.                     mobile: true,
  248.                     tablet: true,
  249.                     desktop: true
  250.                 } %}
  251.             {% else %}
  252.                 {% set visibility = section.visibility %}
  253.             {% endif %}
  254.             {% if not visibility.mobile %}
  255.                 {% set sectionClasses = ['hidden-mobile']|merge(sectionClasses) %}
  256.             {% endif %}
  257.             {% if not visibility.tablet %}
  258.                 {% set sectionClasses = ['hidden-tablet']|merge(sectionClasses) %}
  259.             {% endif %}
  260.             {% if not visibility.desktop %}
  261.                 {% set sectionClasses = ['hidden-desktop']|merge(sectionClasses) %}
  262.             {% endif %}
  263.             {% block page_content_section %}
  264.                 <div class=\"cms-section {{ sectionClasses|join(' ') }}\"
  265.                      style=\"{% if sectionBgColor %}background-color: {{ sectionBgColor }};{% endif %}{% if sectionBgImg %}background-image: url({{ sectionBgImg }});background-size: {{ section.backgroundMediaMode }};{% endif %}\">
  266.                     {% sw_include \"@Storefront/storefront/section/cms-section-\" ~ section.type ~ \".html.twig\" %}
  267.                 </div>
  268.             {% endblock %}
  269.         {% endfor %}
  270.     </div>
  271. {% endblock %}""@econdWebAnalytics/storefront/page/content/detail.html.twig""/var/www/shopware6/custom/plugins/econdWebAnalytics/src/Resources/views/storefront/page/content/detail.html.twig");
  272.     }
  273. }