var/cache/dev_hb199fda60d64cb4aeee9e3d553e0f6c1/twig/f5/f5a5c5bd034b3bb43df40dc3f26791f047285ffe8b35c4e106116bfbd479a6b0.php line 68

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @Storefront/storefront/layout/navigation/offcanvas/categories.html.twig */
  14. class __TwigTemplate_eca92e07f3e733357ac88affcb0af135 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.             'layout_navigation_offcanvas_navigation_categories' => [$this'block_layout_navigation_offcanvas_navigation_categories'],
  25.         ];
  26.     }
  27.     protected function doDisplay(array $context, array $blocks = [])
  28.     {
  29.         $macros $this->macros;
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"));
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"));
  34.         echo "<!-- INCLUDE BEGIN @Storefront/storefront/layout/navigation/offcanvas/categories.html.twig (vendor/shopware/storefront/Resources/views/storefront/layout/navigation/offcanvas/categories.html.twig) -->";
  35.         // line 2
  36.         $context["activeId"] = (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "active", [], "any"falsetruefalse2), "id", [], "any"truetruefalse2) &&  !(null === twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "active", [], "any"falsetruefalse2), "id", [], "any"falsefalsefalse2)))) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "active", [], "any"falsetruefalse2), "id", [], "any"falsefalsefalse2)) : (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["context"] ?? null), "salesChannel", [], "any"falsefalsefalse2), "navigationCategoryId", [], "any"falsefalsefalse2)));
  37.         // line 3
  38.         $context["isRoot"] = (($context["activeId"] ?? null) == twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["context"] ?? null), "salesChannel", [], "any"falsefalsefalse3), "navigationCategoryId", [], "any"falsefalsefalse3));
  39.         // line 4
  40.         $context["children"] = twig_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "getChildren", [=> ($context["activeId"] ?? null)], "method"falsefalsefalse4);
  41.         // line 5
  42.         $context["active"] = twig_get_attribute($this->env$this->source, ($context["navigation"] ?? null), "active", [], "any"falsefalsefalse5);
  43.         // line 6
  44.         echo "
  45. ";
  46.         // line 7
  47.         $this->displayBlock('layout_navigation_offcanvas_navigation_categories'$context$blocks);
  48.         // line 0
  49.         echo "<!-- INCLUDE END @Storefront/storefront/layout/navigation/offcanvas/categories.html.twig -->";
  50.         
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  52.         
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  54.     }
  55.     // line 7
  56.     public function block_layout_navigation_offcanvas_navigation_categories($context, array $blocks = [])
  57.     {
  58.         $macros $this->macros;
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_navigation_offcanvas_navigation_categories"));
  61.         // line 0
  62.         echo "<!-- BLOCK BEGIN layout_navigation_offcanvas_navigation_categories (vendor/shopware/storefront/Resources/views/storefront/layout/navigation/offcanvas/categories.html.twig) -->";
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  64.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_navigation_offcanvas_navigation_categories"));
  65.         // line 8
  66.         echo "    <div class=\"navigation-offcanvas-container js-navigation-offcanvas\">
  67.         <div class=\"navigation-offcanvas-overlay-content js-navigation-offcanvas-overlay-content\">
  68.             ";
  69.         // line 10
  70.         if ( !($context["isRoot"] ?? null)) {
  71.             // line 11
  72.             echo "                ";
  73.             $this->loadTemplate("@Storefront/storefront/layout/navigation/offcanvas/show-all-link.html.twig""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"11)->display($context);
  74.             // line 12
  75.             echo "
  76.                 ";
  77.             // line 13
  78.             $this->loadTemplate("@Storefront/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)]));
  79.             // line 14
  80.             echo "
  81.                 ";
  82.             // line 15
  83.             $this->loadTemplate("@Storefront/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)]));
  84.             // line 16
  85.             echo "            ";
  86.         } else {
  87.             // line 17
  88.             echo "                ";
  89.             $this->loadTemplate("@Storefront/storefront/layout/navigation/offcanvas/general-headline.html.twig""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig"17)->display($context);
  90.             // line 18
  91.             echo "            ";
  92.         }
  93.         // line 19
  94.         echo "
  95.             <ul class=\"list-unstyled navigation-offcanvas-list\">
  96.                 ";
  97.         // line 21
  98.         if (( !($context["isRoot"] ?? null) && (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["page"] ?? null), "navigation", [], "any"falsefalsefalse21), "active", [], "any"falsefalsefalse21), "type", [], "any"falsefalsefalse21) != "folder"))) {
  99.             // line 22
  100.             echo "                    ";
  101.             $this->loadTemplate("@Storefront/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)]));
  102.             // line 23
  103.             echo "                ";
  104.         }
  105.         // line 24
  106.         echo "
  107.                 ";
  108.         // line 26
  109.         echo "                ";
  110.         $context['_parent'] = $context;
  111.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, ($context["children"] ?? null), "tree", [], "any"falsefalsefalse26));
  112.         $context['loop'] = [
  113.           'parent' => $context['_parent'],
  114.           'index0' => 0,
  115.           'index'  => 1,
  116.           'first'  => true,
  117.         ];
  118.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  119.             $length count($context['_seq']);
  120.             $context['loop']['revindex0'] = $length 1;
  121.             $context['loop']['revindex'] = $length;
  122.             $context['loop']['length'] = $length;
  123.             $context['loop']['last'] = === $length;
  124.         }
  125.         foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  126.             // line 27
  127.             echo "                    ";
  128.             $this->loadTemplate("@Storefront/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)]));
  129.             // line 28
  130.             echo "                ";
  131.             ++$context['loop']['index0'];
  132.             ++$context['loop']['index'];
  133.             $context['loop']['first'] = false;
  134.             if (isset($context['loop']['length'])) {
  135.                 --$context['loop']['revindex0'];
  136.                 --$context['loop']['revindex'];
  137.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  138.             }
  139.         }
  140.         $_parent $context['_parent'];
  141.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  142.         $context array_intersect_key($context$_parent) + $_parent;
  143.         // line 29
  144.         echo "            </ul>
  145.         </div>
  146.     </div>
  147. ";
  148.         
  149.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  150.         // line 0
  151.         echo "<!-- BLOCK END layout_navigation_offcanvas_navigation_categories -->";
  152.         
  153.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  154.     }
  155.     public function getTemplateName()
  156.     {
  157.         return "@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig";
  158.     }
  159.     public function getDebugInfo()
  160.     {
  161.         return array (  166 => 0,  158 => 29,  144 => 28,  141 => 27,  123 => 26,  120 => 24,  117 => 23,  114 => 22,  112 => 21,  108 => 19,  105 => 18,  102 => 17,  99 => 16,  97 => 15,  94 => 14,  92 => 13,  89 => 12,  86 => 11,  84 => 10,  80 => 8,  75 => 0,  68 => 7,  58 => 0,  56 => 7,  53 => 6,  51 => 5,  49 => 4,  47 => 3,  45 => 2,);
  162.     }
  163.     public function getSourceContext()
  164.     {
  165.         return new Source("{# @var navigation \\Shopware\\Core\\Content\\Category\\Tree\\Tree #}
  166. {% set activeId = navigation.active.id ?? context.salesChannel.navigationCategoryId %}
  167. {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  168. {% set children = navigation.getChildren(activeId) %}
  169. {% set active = navigation.active %}
  170. {% block layout_navigation_offcanvas_navigation_categories %}
  171.     <div class=\"navigation-offcanvas-container js-navigation-offcanvas\">
  172.         <div class=\"navigation-offcanvas-overlay-content js-navigation-offcanvas-overlay-content\">
  173.             {% if not isRoot %}
  174.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-all-link.html.twig' %}
  175.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/active-item-link.html.twig' with { item: active } %}
  176.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/back-link.html.twig' with { item: active } %}
  177.             {% else %}
  178.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/general-headline.html.twig' %}
  179.             {% endif %}
  180.             <ul class=\"list-unstyled navigation-offcanvas-list\">
  181.                 {% if not isRoot and page.navigation.active.type != \"folder\" %}
  182.                     {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-active-link.html.twig' with { item: active } %}
  183.                 {% endif %}
  184.                 {# @var item \\Shopware\\Core\\Content\\Category\\Tree\\TreeItem #}
  185.                 {% for item in children.tree %}
  186.                     {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/item-link.html.twig' with { item: item, activeId: activeId } %}
  187.                 {% endfor %}
  188.             </ul>
  189.         </div>
  190.     </div>
  191. {% endblock %}
  192. ""@Storefront/storefront/layout/navigation/offcanvas/categories.html.twig""/home/p-a6iu1i/html/hbc-shopware-stage-qcsct/dev/vendor/shopware/storefront/Resources/views/storefront/layout/navigation/offcanvas/categories.html.twig");
  193.     }
  194. }