<?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/_horizontalMenu.html.twig */
class __TwigTemplate_f43e3b2098cc60a571283f5c645d4999952c4aa22e5b53b3dc0054fdf660b645 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Taxon/_horizontalMenu.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Taxon/_horizontalMenu.html.twig"));
// line 18
echo "
";
// line 19
$macros["macros"] = $this->macros["macros"] = $this;
// line 20
echo "
";
// line 21
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.', 21, $this->source); })())) > 0)) {
// line 22
echo "<div class=\"ui large stackable menu\" ";
echo call_user_func_array($this->env->getFunction('sylius_test_html_attribute')->getCallable(), ["menu"]);
echo ">
";
// line 23
$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.', 23, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["taxon"]) {
// line 24
echo " ";
echo twig_call_macro($macros["macros"], "macro_item", [$context["taxon"]], 24, $context, $this->getSourceContext());
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxon'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
echo "</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "item"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "item"));
// line 2
echo " ";
$macros["macros"] = $this;
// line 3
echo "
";
// line 4
if ((twig_length_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.', 4, $this->source); })()), "enabledChildren", [], "any", false, false, false, 4)) > 0)) {
// line 5
echo " <div class=\"ui dropdown item\" ";
echo call_user_func_array($this->env->getFunction('sylius_test_html_attribute')->getCallable(), ["menu-item"]);
echo ">
<span class=\"text\">";
// line 6
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.', 6, $this->source); })()), "name", [], "any", false, false, false, 6), "html", null, true);
echo "</span>
<i class=\"dropdown icon\"></i>
<div class=\"menu\">
";
// line 9
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 9, $this->source); })()), "enabledChildren", [], "any", false, false, false, 9));
foreach ($context['_seq'] as $context["_key"] => $context["childTaxon"]) {
// line 10
echo " ";
echo twig_call_macro($macros["macros"], "macro_item", [$context["childTaxon"]], 10, $context, $this->getSourceContext());
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['childTaxon'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 12
echo " </div>
</div>
";
} else {
// line 15
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["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.', 15, $this->source); })()), "slug", [], "any", false, false, false, 15), "_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.', 15, $this->source); })()), "translation", [], "any", false, false, false, 15), "locale", [], "any", false, false, false, 15)]), "html", null, true);
echo "\" class=\"item\" ";
echo call_user_func_array($this->env->getFunction('sylius_test_html_attribute')->getCallable(), ["menu-item"]);
echo ">";
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.', 15, $this->source); })()), "name", [], "any", false, false, false, 15), "html", null, true);
echo "</a>
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
} finally {
ob_end_clean();
}
}
public function getTemplateName()
{
return "@SyliusShop/Taxon/_horizontalMenu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 139 => 15, 134 => 12, 125 => 10, 121 => 9, 115 => 6, 110 => 5, 108 => 4, 105 => 3, 102 => 2, 83 => 1, 71 => 26, 62 => 24, 58 => 23, 53 => 22, 51 => 21, 48 => 20, 46 => 19, 43 => 18,);
}
public function getSourceContext()
{
return new Source("{% macro item(taxon) %}
{% import _self as macros %}
{% if taxon.enabledChildren|length > 0 %}
<div class=\"ui dropdown item\" {{ sylius_test_html_attribute('menu-item') }}>
<span class=\"text\">{{ taxon.name }}</span>
<i class=\"dropdown icon\"></i>
<div class=\"menu\">
{% for childTaxon in taxon.enabledChildren %}
{{ macros.item(childTaxon) }}
{% endfor %}
</div>
</div>
{% else %}
<a href=\"{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}\" class=\"item\" {{ sylius_test_html_attribute('menu-item') }}>{{ taxon.name }}</a>
{% endif %}
{% endmacro %}
{% import _self as macros %}
{% if taxons|length > 0 %}
<div class=\"ui large stackable menu\" {{ sylius_test_html_attribute('menu') }}>
{% for taxon in taxons %}
{{ macros.item(taxon) }}
{% endfor %}
</div>
{% endif %}
", "@SyliusShop/Taxon/_horizontalMenu.html.twig", "/home/ell/domains/dutoner.ell.mademonstration.fr/public_html/vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/views/Taxon/_horizontalMenu.html.twig");
}
}