var/cache/dev_h56d8cfce56627ac02b444166a4282397/twig/1b/1bb788221187e4482027ec8e142ba0e84b8a5b70a1b9a67844b51b176050be45.php line 55

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