var/cache/dev_hc896b0aecebc6aae6bec469c82cd525f/twig/39/39116ea89766d2a1dd9b437f25f01e0b6d22f76fb93d53baa5c44641cb605c7e.php line 36

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/layout/navigation/offcanvas/categories.html.twig */
  16. class __TwigTemplate_6abef380c7a27eff1fbf4578c822c391 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""@Storefront/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""@Storefront/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 "                ";
  69.             $this->loadTemplate("@Storefront/storefront/layout/navigation/offcanvas/show-all-link.html.twig""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"11)->display($context);
  70.             // line 12
  71.             echo "
  72.                 ";
  73.             // line 13
  74.             $this->loadTemplate("@EfbStorefront/storefront/layout/navigation/offcanvas/active-item-link.html.twig""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"13)->display(twig_array_merge($context, ["item" => ($context["active"] ?? null)]));
  75.             // line 14
  76.             echo "
  77.                 ";
  78.             // line 15
  79.             $this->loadTemplate("@EfbStorefront/storefront/layout/navigation/offcanvas/back-link.html.twig""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"15)->display(twig_array_merge($context, ["item" => ($context["active"] ?? null)]));
  80.             // line 16
  81.             echo "            ";
  82.         } else {
  83.             // line 17
  84.             echo "                ";
  85.             $this->loadTemplate("@Storefront/storefront/layout/navigation/offcanvas/general-headline.html.twig""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"17)->display($context);
  86.             // line 18
  87.             echo "            ";
  88.         }
  89.         // line 19
  90.         echo "
  91.             <ul class=\"list-unstyled navigation-offcanvas-list\">
  92.                 ";
  93.         // line 21
  94.         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"falsefalsefalse21), "active", [], "any"falsefalsefalse21), "type", [], "any"falsefalsefalse21) != "folder"))) {
  95.             // line 22
  96.             echo "                    ";
  97.             $this->loadTemplate("@EfbStorefront/storefront/layout/navigation/offcanvas/show-active-link.html.twig""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"22)->display(twig_array_merge($context, ["item" => ($context["active"] ?? null)]));
  98.             // line 23
  99.             echo "                ";
  100.         }
  101.         // line 24
  102.         echo "
  103.                 ";
  104.         // line 26
  105.         echo "                ";
  106.         $context['_parent'] = $context;
  107.         $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->source, ($context["children"] ?? null), "tree", [], "any"falsefalsefalse26));
  108.         $context['loop'] = [
  109.           'parent' => $context['_parent'],
  110.           'index0' => 0,
  111.           'index'  => 1,
  112.           'first'  => true,
  113.         ];
  114.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  115.             $length count($context['_seq']);
  116.             $context['loop']['revindex0'] = $length 1;
  117.             $context['loop']['revindex'] = $length;
  118.             $context['loop']['length'] = $length;
  119.             $context['loop']['last'] = === $length;
  120.         }
  121.         foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  122.             // line 27
  123.             echo "                    ";
  124.             $this->loadTemplate("@EfbStorefront/storefront/layout/navigation/offcanvas/item-link.html.twig""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"27)->display(twig_array_merge($context, ["item" => $context["item"], "activeId" => ($context["activeId"] ?? null)]));
  125.             // line 28
  126.             echo "                ";
  127.             ++$context['loop']['index0'];
  128.             ++$context['loop']['index'];
  129.             $context['loop']['first'] = false;
  130.             if (isset($context['loop']['length'])) {
  131.                 --$context['loop']['revindex0'];
  132.                 --$context['loop']['revindex'];
  133.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  134.             }
  135.         }
  136.         $_parent $context['_parent'];
  137.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  138.         $context array_intersect_key($context$_parent) + $_parent;
  139.         // line 29
  140.         echo "            </ul>
  141.         </div>
  142.     </div>
  143. ";
  144.         
  145.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  146.         
  147.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  148.     }
  149.     public function getTemplateName()
  150.     {
  151.         return "@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig";
  152.     }
  153.     public function isTraitable()
  154.     {
  155.         return false;
  156.     }
  157.     public function getDebugInfo()
  158.     {
  159.         return array (  152 => 29,  138 => 28,  135 => 27,  117 => 26,  114 => 24,  111 => 23,  108 => 22,  106 => 21,  102 => 19,  99 => 18,  96 => 17,  93 => 16,  91 => 15,  88 => 14,  86 => 13,  83 => 12,  80 => 11,  78 => 10,  74 => 8,  55 => 7,  52 => 6,  50 => 5,  48 => 4,  46 => 3,  44 => 2,);
  160.     }
  161.     public function getSourceContext()
  162.     {
  163.         return new Source("{# @var navigation \\Shopware\\Core\\Content\\Category\\Tree\\Tree #}
  164. {% set activeId = navigation.active.id ?? context.salesChannel.navigationCategoryId %}
  165. {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  166. {% set children = navigation.getChildren(activeId) %}
  167. {% set active = navigation.active %}
  168. {% block layout_navigation_offcanvas_navigation_categories %}
  169.     <div class=\"navigation-offcanvas-container js-navigation-offcanvas\">
  170.         <div class=\"navigation-offcanvas-overlay-content js-navigation-offcanvas-overlay-content\">
  171.             {% if not isRoot %}
  172.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-all-link.html.twig' %}
  173.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/active-item-link.html.twig' with { item: active } %}
  174.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/back-link.html.twig' with { item: active } %}
  175.             {% else %}
  176.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/general-headline.html.twig' %}
  177.             {% endif %}
  178.             <ul class=\"list-unstyled navigation-offcanvas-list\">
  179.                 {% if not isRoot and page.navigation.active.type != \"folder\" %}
  180.                     {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-active-link.html.twig' with { item: active } %}
  181.                 {% endif %}
  182.                 {# @var item \\Shopware\\Core\\Content\\Category\\Tree\\TreeItem #}
  183.                 {% for item in children.tree %}
  184.                     {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/item-link.html.twig' with { item: item, activeId: activeId } %}
  185.                 {% endfor %}
  186.             </ul>
  187.         </div>
  188.     </div>
  189. {% endblock %}
  190. ""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig""/var/www/share/efb-elektronik.dev.mc.emzcustomers.de/shopware6/vendor/shopware/storefront/Resources/views/storefront/layout/navigation/offcanvas/categories.html.twig");
  191.     }
  192. }