var/cache/dev/twig/23/23c9f0e6ea2d547d97a080d46b9647d4.php line 88

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. /* @SyliusShop/Taxon/verticalMenu.html.twig */
  14. class __TwigTemplate_b9c9f6cd626473c51854c636704d6a7f 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.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Taxon/verticalMenu.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Taxon/verticalMenu.html.twig"));
  33.         // line 1
  34.         $context["registerProductsLink"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_login");
  35.         // line 2
  36.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  37.             // line 3
  38.             echo "    ";
  39.             if ((((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "user", [], "any"falsetruefalse3), "customer", [], "any"falsetruefalse3), "organization", [], "any"falsetruefalse3), "vendor", [], "any"truetruefalse3)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "user", [], "any"falsetruefalse3), "customer", [], "any"falsetruefalse3), "organization", [], "any"falsetruefalse3), "vendor", [], "any"falsefalsefalse3), null)) : (null)) == null)) {
  40.                 // line 4
  41.                 echo "        ";
  42.                 $context["registerProductsLink"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("open_marketplace_vendor_register_form");
  43.                 // line 5
  44.                 echo "    ";
  45.             } else {
  46.                 // line 6
  47.                 echo "        ";
  48.                 $context["registerProductsLink"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("open_marketplace_vendor_product_listings_index");
  49.                 // line 7
  50.                 echo "    ";
  51.             }
  52.         }
  53.         // line 28
  54.         echo "
  55. ";
  56.         // line 29
  57.         $macros["macros"] = $this->macros["macros"] = $this;
  58.         // line 30
  59.         echo "
  60. ";
  61.         // line 31
  62.         if ((twig_length_filter($this->env, (isset($context["taxons"]) || array_key_exists("taxons"$context) ? $context["taxons"] : (function () { throw new RuntimeError('Variable "taxons" does not exist.'31$this->source); })())) > 0)) {
  63.             // line 32
  64.             echo "    ";
  65.             $context['_parent'] = $context;
  66.             $context['_seq'] = twig_ensure_traversable((isset($context["taxons"]) || array_key_exists("taxons"$context) ? $context["taxons"] : (function () { throw new RuntimeError('Variable "taxons" does not exist.'32$this->source); })()));
  67.             foreach ($context['_seq'] as $context["_key"] => $context["taxon"]) {
  68.                 // line 33
  69.                 echo "        ";
  70.                 echo twig_call_macro($macros["macros"], "macro_item", [$context["taxon"]], 33$context$this->getSourceContext());
  71.                 echo "
  72.     ";
  73.             }
  74.             $_parent $context['_parent'];
  75.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxon'], $context['_parent'], $context['loop']);
  76.             $context array_intersect_key($context$_parent) + $_parent;
  77.             // line 35
  78.             echo "    ";
  79.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("open_marketplace_shop_render_country_menu", ["template" => "@SyliusShop/Layout/Sidebar/Menu/country.html.twig"]));
  80.             echo "
  81.     <a href=\"";
  82.             // line 36
  83.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("open_marketplace_shop_vendor_index");
  84.             echo "\" class=\"accordion-link item font-bold\">";
  85.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.brands"), "html"nulltrue);
  86.             echo "</a>
  87.     ";
  88.             // line 37
  89.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("open_marketplace_shop_render_use_case_menu", ["template" => "@SyliusShop/Layout/Sidebar/Menu/useCase.html.twig"]));
  90.             echo "
  91.     <a href=\"";
  92.             // line 38
  93.             echo twig_escape_filter($this->env, (isset($context["registerProductsLink"]) || array_key_exists("registerProductsLink"$context) ? $context["registerProductsLink"] : (function () { throw new RuntimeError('Variable "registerProductsLink" does not exist.'38$this->source); })()), "html"nulltrue);
  94.             echo "\" class=\"accordion-link item font-bold\">";
  95.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.register_products"), "html"nulltrue);
  96.             echo "</a>
  97. ";
  98.         }
  99.         
  100.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  101.         
  102.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  103.     }
  104.     // line 9
  105.     public function macro_item($__taxon__ null, ...$__varargs__)
  106.     {
  107.         $macros $this->macros;
  108.         $context $this->env->mergeGlobals([
  109.             "taxon" => $__taxon__,
  110.             "varargs" => $__varargs__,
  111.         ]);
  112.         $blocks = [];
  113.         ob_start();
  114.         try {
  115.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  116.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""item"));
  117.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  118.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""item"));
  119.             // line 10
  120.             echo "    ";
  121.             $macros["macros"] = $this;
  122.             // line 11
  123.             echo "    ";
  124.             $context["children"] = twig_get_attribute($this->env$this->source, (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'11$this->source); })()), "getEnabledChildrenByTranslationName", [=> twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'11$this->source); })()), "translation", [], "any"falsefalsefalse11), "locale", [], "any"falsefalsefalse11)], "method"falsefalsefalse11);
  125.             // line 12
  126.             echo "    ";
  127.             if ((twig_length_filter($this->env, (isset($context["children"]) || array_key_exists("children"$context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.'12$this->source); })())) > 0)) {
  128.                 // line 13
  129.                 echo "        <div class=\"accordion transition visible\">
  130.             <div class=\"title\">
  131.                 ";
  132.                 // line 15
  133.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'15$this->source); })()), "name", [], "any"falsefalsefalse15), "html"nulltrue);
  134.                 echo "
  135.                 <span class=\"material-symbols-outlined\">expand_more</span>
  136.             </div>
  137.             <div class=\"content\">
  138.                 ";
  139.                 // line 19
  140.                 $context['_parent'] = $context;
  141.                 $context['_seq'] = twig_ensure_traversable((isset($context["children"]) || array_key_exists("children"$context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.'19$this->source); })()));
  142.                 foreach ($context['_seq'] as $context["_key"] => $context["childTaxon"]) {
  143.                     // line 20
  144.                     echo "                    ";
  145.                     echo twig_call_macro($macros["macros"], "macro_item", [$context["childTaxon"]], 20$context$this->getSourceContext());
  146.                     echo "
  147.                 ";
  148.                 }
  149.                 $_parent $context['_parent'];
  150.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['childTaxon'], $context['_parent'], $context['loop']);
  151.                 $context array_intersect_key($context$_parent) + $_parent;
  152.                 // line 22
  153.                 echo "            </div>
  154.         </div>
  155.     ";
  156.             } else {
  157.                 // line 25
  158.                 echo "        <a href=\"";
  159.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("bitbag_sylius_elasticsearch_plugin_shop_list_products", ["slug" => twig_get_attribute($this->env$this->source, (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'25$this->source); })()), "slug", [], "any"falsefalsefalse25), "_locale" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'25$this->source); })()), "translation", [], "any"falsefalsefalse25), "locale", [], "any"falsefalsefalse25)]), "html"nulltrue);
  160.                 echo "\" class=\"accordion-link item font-bold\">";
  161.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["taxon"]) || array_key_exists("taxon"$context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.'25$this->source); })()), "name", [], "any"falsefalsefalse25), "html"nulltrue);
  162.                 echo "</a>
  163.     ";
  164.             }
  165.             
  166.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  167.             
  168.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  169.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  170.         } finally {
  171.             ob_end_clean();
  172.         }
  173.     }
  174.     public function getTemplateName()
  175.     {
  176.         return "@SyliusShop/Taxon/verticalMenu.html.twig";
  177.     }
  178.     public function isTraitable()
  179.     {
  180.         return false;
  181.     }
  182.     public function getDebugInfo()
  183.     {
  184.         return array (  174 => 25,  169 => 22,  160 => 20,  156 => 19,  149 => 15,  145 => 13,  142 => 12,  139 => 11,  136 => 10,  117 => 9,  102 => 38,  98 => 37,  92 => 36,  87 => 35,  78 => 33,  73 => 32,  71 => 31,  68 => 30,  66 => 29,  63 => 28,  59 => 7,  56 => 6,  53 => 5,  50 => 4,  47 => 3,  45 => 2,  43 => 1,);
  185.     }
  186.     public function getSourceContext()
  187.     {
  188.         return new Source("{% set registerProductsLink = url('sylius_shop_login') %}
  189. {% if is_granted('ROLE_USER') %}
  190.     {% if app.user.customer.organization.vendor|default(null) == null %}
  191.         {% set registerProductsLink = url('open_marketplace_vendor_register_form') %}
  192.     {% else %}
  193.         {% set registerProductsLink = url('open_marketplace_vendor_product_listings_index') %}
  194.     {% endif %}
  195. {% endif %}
  196. {% macro item(taxon) %}
  197.     {% import _self as macros %}
  198.     {% set children = taxon.getEnabledChildrenByTranslationName(taxon.translation.locale) %}
  199.     {% if children|length > 0 %}
  200.         <div class=\"accordion transition visible\">
  201.             <div class=\"title\">
  202.                 {{ taxon.name }}
  203.                 <span class=\"material-symbols-outlined\">expand_more</span>
  204.             </div>
  205.             <div class=\"content\">
  206.                 {% for childTaxon in children %}
  207.                     {{ macros.item(childTaxon) }}
  208.                 {% endfor %}
  209.             </div>
  210.         </div>
  211.     {% else %}
  212.         <a href=\"{{ path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}\" class=\"accordion-link item font-bold\">{{ taxon.name }}</a>
  213.     {% endif %}
  214. {% endmacro %}
  215. {% import _self as macros %}
  216. {% if taxons|length > 0 %}
  217.     {% for taxon in taxons %}
  218.         {{ macros.item(taxon) }}
  219.     {% endfor %}
  220.     {{ render(path('open_marketplace_shop_render_country_menu', {'template': '@SyliusShop/Layout/Sidebar/Menu/country.html.twig'})) }}
  221.     <a href=\"{{ path('open_marketplace_shop_vendor_index') }}\" class=\"accordion-link item font-bold\">{{ 'app.ui.brands'|trans }}</a>
  222.     {{ render(path('open_marketplace_shop_render_use_case_menu', {'template': '@SyliusShop/Layout/Sidebar/Menu/useCase.html.twig'})) }}
  223.     <a href=\"{{ registerProductsLink }}\" class=\"accordion-link item font-bold\">{{ 'app.ui.register_products'|trans }}</a>
  224. {% endif %}
  225. ""@SyliusShop/Taxon/verticalMenu.html.twig""/srv/open_marketplace/templates/bundles/SyliusShopBundle/Taxon/verticalMenu.html.twig");
  226.     }
  227. }