<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @SyliusShop/Taxon/verticalMenu.html.twig */
class __TwigTemplate_3ab9e2723fec3097f252e261c3d4e4c9 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Taxon/verticalMenu.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Taxon/verticalMenu.html.twig"));
// line 24
echo "
";
// line 25
$macros["macros"] = $this->macros["macros"] = $this;
// line 26
echo "
";
// line 27
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)) {
// line 28
echo "\t";
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["taxon"]) {
// line 29
echo "\t\t";
echo twig_call_macro($macros["macros"], "macro_item", [$context["taxon"]], 29, $context, $this->getSourceContext());
echo "
\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxon'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 31
echo "\t";
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"]));
echo "
\t<a href=\"";
// line 32
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("open_marketplace_shop_vendor_index");
echo "\" class=\"accordion-link item font-bold\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.brands"), "html", null, true);
echo "</a>
\t";
// line 33
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"]));
echo "
\t<a href=\"";
// line 34
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_login");
echo "\" class=\"accordion-link item font-bold\" ";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
echo " style=\"display: none;\" ";
}
echo ">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.register_products"), "html", null, true);
echo "</a>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 1
public function macro_item($__taxon__ = null, ...$__varargs__)
{
$macros = $this->macros;
$context = $this->env->mergeGlobals([
"taxon" => $__taxon__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "item"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "item"));
// line 2
echo "\t";
$macros["macros"] = $this;
// line 3
echo "\t";
$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", [0 => twig_get_attribute($this->env, $this->source, 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); })()), "translation", [], "any", false, false, false, 3), "locale", [], "any", false, false, false, 3)], "method", false, false, false, 3);
// line 4
echo "\t";
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)) {
// line 5
echo "\t\t<div class=\"accordion transition visible\">
\t\t\t<div class=\"title\">
\t\t\t\t<a href=\"";
// line 7
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", false, false, false, 7), "_locale" => twig_get_attribute($this->env, $this->source, 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); })()), "translation", [], "any", false, false, false, 7), "locale", [], "any", false, false, false, 7)]), "html", null, true);
echo "\" class=\"menu-title-link\">
\t\t\t\t\t";
// line 8
echo twig_escape_filter($this->env, 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.', 8, $this->source); })()), "name", [], "any", false, false, false, 8), "html", null, true);
echo "
\t\t\t\t</a>
\t\t\t\t<img class=\"icon toggle-icon\" src=\"";
// line 10
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/shop/images/keyboard_arrow_down.svg", "shop"), "html", null, true);
echo "\" alt=\"Expand more\">
\t\t\t</div>
\t\t\t<div class=\"content\">
\t\t\t\t";
// line 13
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["childTaxon"]) {
// line 14
echo "\t\t\t\t\t";
echo twig_call_macro($macros["macros"], "macro_item", [$context["childTaxon"]], 14, $context, $this->getSourceContext());
echo "
\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['childTaxon'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo "\t\t\t</div>
\t\t</div>
\t";
} else {
// line 19
echo "\t\t<a href=\"";
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", false, false, false, 19), "_locale" => twig_get_attribute($this->env, $this->source, 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); })()), "translation", [], "any", false, false, false, 19), "locale", [], "any", false, false, false, 19)]), "html", null, true);
echo "\" class=\"accordion-link item font-bold\">
\t\t\t";
// line 20
echo twig_escape_filter($this->env, 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.', 20, $this->source); })()), "name", [], "any", false, false, false, 20), "html", null, true);
echo "
\t\t</a>
\t";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
} finally {
ob_end_clean();
}
}
public function getTemplateName()
{
return "@SyliusShop/Taxon/verticalMenu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% macro item(taxon) %}
\t{% import _self as macros %}
\t{% set children = taxon.getEnabledChildrenByTranslationName(taxon.translation.locale) %}
\t{% if children|length > 0 %}
\t\t<div class=\"accordion transition visible\">
\t\t\t<div class=\"title\">
\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\">
\t\t\t\t\t{{ taxon.name }}
\t\t\t\t</a>
\t\t\t\t<img class=\"icon toggle-icon\" src=\"{{ asset('build/shop/images/keyboard_arrow_down.svg', 'shop') }}\" alt=\"Expand more\">
\t\t\t</div>
\t\t\t<div class=\"content\">
\t\t\t\t{% for childTaxon in children %}
\t\t\t\t\t{{ macros.item(childTaxon) }}
\t\t\t\t{% endfor %}
\t\t\t</div>
\t\t</div>
\t{% else %}
\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\">
\t\t\t{{ taxon.name }}
\t\t</a>
\t{% endif %}
{% endmacro %}
{% import _self as macros %}
{% if taxons|length > 0 %}
\t{% for taxon in taxons %}
\t\t{{ macros.item(taxon) }}
\t{% endfor %}
\t{{ render(path('open_marketplace_shop_render_country_menu', {'template': '@SyliusShop/Layout/Sidebar/Menu/country.html.twig'})) }}
\t<a href=\"{{ path('open_marketplace_shop_vendor_index') }}\" class=\"accordion-link item font-bold\">{{ 'app.ui.brands'|trans }}</a>
\t{{ render(path('open_marketplace_shop_render_use_case_menu', {'template': '@SyliusShop/Layout/Sidebar/Menu/useCase.html.twig'})) }}
\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>
{% endif %}
", "@SyliusShop/Taxon/verticalMenu.html.twig", "/srv/open_marketplace/templates/bundles/SyliusShopBundle/Taxon/verticalMenu.html.twig");
}
}