var/cache/dev/twig/da/da7ba75cbf0bb17338a279b682c7d7e6.php line 33

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