var/cache/dev_h4ff618508373c27d1785d8a4ae5b58dc/twig/e0/e07bf0ca6902b80b5da36cfac3d4f5c76ae3afdebe2ae14fc5fd270f83045bc6.php line 85

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. /* @EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig */
  16. class __TwigTemplate_e8517837fd02d537f7f017f877b31dfe 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.             'layout_navigation_offcanvas_navigation_categories' => [$this'block_layout_navigation_offcanvas_navigation_categories'],
  27.         ];
  28.     }
  29.     protected function doDisplay(array $context, array $blocks = [])
  30.     {
  31.         $macros $this->macros;
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  33.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"));
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  35.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"));
  36.         // line 2
  37.         $context["activeId"] = (((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "active", [], "any"falsetruefalse2), "id", [], "any"truetruefalse2) &&  !(null === sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "active", [], "any"falsetruefalse2), "id", [], "any"falsefalsefalse2)))) ? (sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "active", [], "any"falsetruefalse2), "id", [], "any"falsefalsefalse2)) : (sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["context"] ?? null), "salesChannel", [], "any"falsefalsefalse2), "navigationCategoryId", [], "any"falsefalsefalse2)));
  38.         // line 3
  39.         $context["isRoot"] = (($context["activeId"] ?? null) == sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["context"] ?? null), "salesChannel", [], "any"falsefalsefalse3), "navigationCategoryId", [], "any"falsefalsefalse3));
  40.         // line 4
  41.         $context["children"] = sw_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "getChildren", [=> ($context["activeId"] ?? null)], "method"falsefalsefalse4);
  42.         // line 5
  43.         $context["active"] = sw_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "active", [], "any"falsefalsefalse5);
  44.         // line 6
  45.         echo "
  46. ";
  47.         // line 7
  48.         $this->displayBlock('layout_navigation_offcanvas_navigation_categories'$context$blocks);
  49.         
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  51.         
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  53.     }
  54.     public function block_layout_navigation_offcanvas_navigation_categories($context, array $blocks = [])
  55.     {
  56.         $macros $this->macros;
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_navigation_offcanvas_navigation_categories"));
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_navigation_offcanvas_navigation_categories"));
  61.         // line 8
  62.         echo "    <div class=\"navigation-offcanvas-container js-navigation-offcanvas\">
  63.         <div class=\"navigation-offcanvas-overlay-content js-navigation-offcanvas-overlay-content\">
  64.             ";
  65.         // line 10
  66.         if ( !($context["isRoot"] ?? null)) {
  67.             // line 11
  68.             echo "            <div class=\"navigation-offcanvas-top\" style=\"display:flex\">
  69.                 ";
  70.             // line 12
  71.             $this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/show-all-link.html.twig""@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"12)->display($context);
  72.             // line 13
  73.             echo "
  74.                 ";
  75.             // line 14
  76.             $this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/active-item-link.html.twig""@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"14)->display(twig_array_merge($context, ["item" => ($context["active"] ?? null)]));
  77.             // line 15
  78.             echo "
  79.                 ";
  80.             // line 16
  81.             $this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/back-link.html.twig""@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"16)->display(twig_array_merge($context, ["item" => ($context["active"] ?? null)]));
  82.             // line 17
  83.             echo "            </div>
  84.             ";
  85.         } else {
  86.             // line 19
  87.             echo "                ";
  88.             // line 20
  89.             echo "            ";
  90.         }
  91.         // line 21
  92.         echo "
  93.             <ul class=\"list-unstyled navigation-offcanvas-list offcanvas-custom-menu-ul\">                
  94.                 ";
  95.         // line 23
  96.         $context['_parent'] = $context;
  97.         $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->source, ($context["children"] ?? null), "tree", [], "any"falsefalsefalse23));
  98.         $context['loop'] = [
  99.           'parent' => $context['_parent'],
  100.           'index0' => 0,
  101.           'index'  => 1,
  102.           'first'  => true,
  103.         ];
  104.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  105.             $length count($context['_seq']);
  106.             $context['loop']['revindex0'] = $length 1;
  107.             $context['loop']['revindex'] = $length;
  108.             $context['loop']['length'] = $length;
  109.             $context['loop']['last'] = === $length;
  110.         }
  111.         foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  112.             // line 24
  113.             echo "                    ";
  114.             $this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/item-link.html.twig""@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"24)->display(twig_array_merge($context, ["item" => $context["item"], "activeId" => ($context["activeId"] ?? null)]));
  115.             // line 25
  116.             echo "                ";
  117.             ++$context['loop']['index0'];
  118.             ++$context['loop']['index'];
  119.             $context['loop']['first'] = false;
  120.             if (isset($context['loop']['length'])) {
  121.                 --$context['loop']['revindex0'];
  122.                 --$context['loop']['revindex'];
  123.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  124.             }
  125.         }
  126.         $_parent $context['_parent'];
  127.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  128.         $context array_intersect_key($context$_parent) + $_parent;
  129.         // line 26
  130.         echo "
  131.                 <div class=\"navigation-offcanvas-top\">
  132.                 
  133.                     ";
  134.         // line 29
  135.         if (( !($context["isRoot"] ?? null) && (sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "navigation", [], "any"falsefalsefalse29), "active", [], "any"falsefalsefalse29), "type", [], "any"falsefalsefalse29) != "folder"))) {
  136.             // line 30
  137.             echo "                        ";
  138.             $this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/show-active-link.html.twig""@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"30)->display(twig_array_merge($context, ["item" => ($context["active"] ?? null)]));
  139.             echo "                       
  140.                     ";
  141.         }
  142.         // line 32
  143.         echo "                </div>
  144.                 <div class=\"navigation-offcanvas-top-big\">
  145.                 
  146.                     ";
  147.         // line 35
  148.         if (( !($context["isRoot"] ?? null) && (sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "navigation", [], "any"falsefalsefalse35), "active", [], "any"falsefalsefalse35), "type", [], "any"falsefalsefalse35) != "folder"))) {
  149.             // line 36
  150.             echo "                        ";
  151.             $context['_parent'] = $context;
  152.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "header", [], "any"falsefalsefalse36), "navigation", [], "any"falsefalsefalse36), "tree", [], "any"falsefalsefalse36));
  153.             $context['loop'] = [
  154.               'parent' => $context['_parent'],
  155.               'index0' => 0,
  156.               'index'  => 1,
  157.               'first'  => true,
  158.             ];
  159.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  160.                 $length count($context['_seq']);
  161.                 $context['loop']['revindex0'] = $length 1;
  162.                 $context['loop']['revindex'] = $length;
  163.                 $context['loop']['length'] = $length;
  164.                 $context['loop']['last'] = === $length;
  165.             }
  166.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  167.                 // line 37
  168.                 echo "                            ";
  169.                 $this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/item-link.html.twig""@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"37)->display(twig_array_merge($context, ["item" => $context["item"], "activeId" => sw_get_attribute($this->env$this->source, ($context["active"] ?? null), "Id", [], "any"falsefalsefalse37), "parentId" => sw_get_attribute($this->env$this->source, ($context["active"] ?? null), "parentId", [], "any"falsefalsefalse37)]));
  170.                 // line 38
  171.                 echo "                        ";
  172.                 ++$context['loop']['index0'];
  173.                 ++$context['loop']['index'];
  174.                 $context['loop']['first'] = false;
  175.                 if (isset($context['loop']['length'])) {
  176.                     --$context['loop']['revindex0'];
  177.                     --$context['loop']['revindex'];
  178.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  179.                 }
  180.             }
  181.             $_parent $context['_parent'];
  182.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  183.             $context array_intersect_key($context$_parent) + $_parent;
  184.             // line 39
  185.             echo "                    ";
  186.         }
  187.         // line 40
  188.         echo "                </div>
  189.             </ul>
  190.         </div>
  191.        
  192.     </div>    
  193. ";
  194.         
  195.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  196.         
  197.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  198.     }
  199.     public function getTemplateName()
  200.     {
  201.         return "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig";
  202.     }
  203.     public function isTraitable()
  204.     {
  205.         return false;
  206.     }
  207.     public function getDebugInfo()
  208.     {
  209.         return array (  200 => 40,  197 => 39,  183 => 38,  180 => 37,  162 => 36,  160 => 35,  155 => 32,  149 => 30,  147 => 29,  142 => 26,  128 => 25,  125 => 24,  108 => 23,  104 => 21,  101 => 20,  99 => 19,  95 => 17,  93 => 16,  90 => 15,  88 => 14,  85 => 13,  83 => 12,  80 => 11,  78 => 10,  74 => 8,  55 => 7,  52 => 6,  50 => 5,  48 => 4,  46 => 3,  44 => 2,);
  210.     }
  211.     public function getSourceContext()
  212.     {
  213.         return new Source("{# @var navigation \\Shopware\\Core\\Content\\Category\\Tree\\Tree #}
  214. {% set activeId = navigation.active.id ?? context.salesChannel.navigationCategoryId %}
  215. {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  216. {% set children = navigation.getChildren(activeId) %}
  217. {% set active = navigation.active %}
  218. {% block layout_navigation_offcanvas_navigation_categories %}
  219.     <div class=\"navigation-offcanvas-container js-navigation-offcanvas\">
  220.         <div class=\"navigation-offcanvas-overlay-content js-navigation-offcanvas-overlay-content\">
  221.             {% if not isRoot %}
  222.             <div class=\"navigation-offcanvas-top\" style=\"display:flex\">
  223.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-all-link.html.twig' %}
  224.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/active-item-link.html.twig' with { item: active } %}
  225.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/back-link.html.twig' with { item: active } %}
  226.             </div>
  227.             {% else %}
  228.                 {# {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/general-headline.html.twig' %} #}
  229.             {% endif %}
  230.             <ul class=\"list-unstyled navigation-offcanvas-list offcanvas-custom-menu-ul\">                
  231.                 {% for item in children.tree %}
  232.                     {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/item-link.html.twig' with { item: item, activeId: activeId } %}
  233.                 {% endfor %}
  234.                 <div class=\"navigation-offcanvas-top\">
  235.                 
  236.                     {% if not isRoot and page.navigation.active.type != \"folder\" %}
  237.                         {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-active-link.html.twig' with { item: active } %}                       
  238.                     {% endif %}
  239.                 </div>
  240.                 <div class=\"navigation-offcanvas-top-big\">
  241.                 
  242.                     {% if not isRoot and page.navigation.active.type != \"folder\" %}
  243.                         {% for item in page.header.navigation.tree %}
  244.                             {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/item-link.html.twig' with { item: item, activeId: active.Id, parentId: active.parentId } %}
  245.                         {% endfor %}
  246.                     {% endif %}
  247.                 </div>
  248.             </ul>
  249.         </div>
  250.        
  251.     </div>    
  252. {% endblock %}""@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig""/var/www/shop.emova.de/html/custom/plugins/EmovaWbTheme/src/Resources/views/storefront/layout/navigation/offcanvas/categories.html.twig");
  253.     }
  254. }