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