<?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/Product/Index/_sidebar.html.twig */
class __TwigTemplate_c37f4278f37687994e5037d9576b58ac 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/Product/Index/_sidebar.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/Product/Index/_sidebar.html.twig"));
// line 2
$context["route"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 2, $this->source); })()), "request", [], "any", false, false, false, 2), "attributes", [], "any", false, false, false, 2), "get", [0 => "_route"], "method", false, false, false, 2);
// line 3
$context["mainTaxon"] = null;
// line 4
$context["currentTaxon"] = (($context["taxon"]) ?? ((((twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "mainTaxon", [], "any", true, true, false, 4) && !(null === twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "mainTaxon", [], "any", false, false, false, 4)))) ? (twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "mainTaxon", [], "any", false, false, false, 4)) : (null))));
// line 5
$context["currentTaxonSlug"] = null;
// line 6
echo "
";
// line 7
if (((isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 7, $this->source); })()) && (twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 7, $this->source); })()), "level", [], "any", false, false, false, 7) == 2))) {
// line 8
echo " ";
$context["mainTaxon"] = (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 8, $this->source); })());
} elseif ((( // line 9
(isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 9, $this->source); })()) && twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 9, $this->source); })()), "parent", [], "any", false, false, false, 9)) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 9, $this->source); })()), "parent", [], "any", false, false, false, 9), "level", [], "any", false, false, false, 9) == 2))) {
// line 10
echo " ";
$context["mainTaxon"] = twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 10, $this->source); })()), "parent", [], "any", false, false, false, 10);
} elseif (((( // line 11
(isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 11, $this->source); })()) && twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 11, $this->source); })()), "parent", [], "any", false, false, false, 11)) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 11, $this->source); })()), "parent", [], "any", false, false, false, 11), "parent", [], "any", false, false, false, 11)) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 11, $this->source); })()), "parent", [], "any", false, false, false, 11), "parent", [], "any", false, false, false, 11), "level", [], "any", false, false, false, 11) == 2))) {
// line 12
echo " ";
$context["mainTaxon"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 12, $this->source); })()), "parent", [], "any", false, false, false, 12), "parent", [], "any", false, false, false, 12);
} elseif ((((( // line 13
(isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 13, $this->source); })()) && twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 13, $this->source); })()), "parent", [], "any", false, false, false, 13)) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 13, $this->source); })()), "parent", [], "any", false, false, false, 13), "parent", [], "any", false, false, false, 13)) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 13, $this->source); })()), "parent", [], "any", false, false, false, 13), "parent", [], "any", false, false, false, 13), "parent", [], "any", false, false, false, 13)) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 13, $this->source); })()), "parent", [], "any", false, false, false, 13), "parent", [], "any", false, false, false, 13), "parent", [], "any", false, false, false, 13), "level", [], "any", false, false, false, 13) == 2))) {
// line 14
echo " ";
$context["mainTaxon"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 14, $this->source); })()), "parent", [], "any", false, false, false, 14), "parent", [], "any", false, false, false, 14), "parent", [], "any", false, false, false, 14);
} elseif (((((( // line 15
(isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 15, $this->source); })()) && twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 15, $this->source); })()), "parent", [], "any", false, false, false, 15)) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 15, $this->source); })()), "parent", [], "any", false, false, false, 15), "parent", [], "any", false, false, false, 15)) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 15, $this->source); })()), "parent", [], "any", false, false, false, 15), "parent", [], "any", false, false, false, 15), "parent", [], "any", false, false, false, 15)) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 15, $this->source); })()), "parent", [], "any", false, false, false, 15), "parent", [], "any", false, false, false, 15), "parent", [], "any", false, false, false, 15), "parent", [], "any", false, false, false, 15)) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 15, $this->source); })()), "parent", [], "any", false, false, false, 15), "parent", [], "any", false, false, false, 15), "parent", [], "any", false, false, false, 15), "parent", [], "any", false, false, false, 15), "level", [], "any", false, false, false, 15) == 2))) {
// line 16
echo " ";
$context["mainTaxon"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentTaxon"]) || array_key_exists("currentTaxon", $context) ? $context["currentTaxon"] : (function () { throw new RuntimeError('Variable "currentTaxon" does not exist.', 16, $this->source); })()), "parent", [], "any", false, false, false, 16), "parent", [], "any", false, false, false, 16), "parent", [], "any", false, false, false, 16), "parent", [], "any", false, false, false, 16);
}
// line 18
echo "
";
// line 19
if (("sylius_shop_product_index" == (isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 19, $this->source); })()))) {
// line 20
echo " ";
$context["currentTaxonSlug"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 20, $this->source); })()), "request", [], "any", false, false, false, 20), "attributes", [], "any", false, false, false, 20), "get", [0 => "slug"], "method", false, false, false, 20);
} elseif (((("sylius_shop_product_show" == // line 21
(isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 21, $this->source); })())) && !(null === twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 21, $this->source); })()), "mainTaxon", [], "any", false, false, false, 21))) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 21, $this->source); })()), "mainTaxon", [], "any", false, false, false, 21), "enabled", [], "any", false, false, false, 21))) {
// line 22
echo " ";
$context["currentTaxonSlug"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 22, $this->source); })()), "mainTaxon", [], "any", false, false, false, 22), "slug", [], "any", false, false, false, 22);
}
// line 24
echo "
";
// line 25
if (((isset($context["mainTaxon"]) || array_key_exists("mainTaxon", $context) ? $context["mainTaxon"] : (function () { throw new RuntimeError('Variable "mainTaxon" does not exist.', 25, $this->source); })()) && (isset($context["currentTaxonSlug"]) || array_key_exists("currentTaxonSlug", $context) ? $context["currentTaxonSlug"] : (function () { throw new RuntimeError('Variable "currentTaxonSlug" does not exist.', 25, $this->source); })()))) {
// line 26
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_taxon_show_by_menu_taxon", ["menuTaxon" => twig_get_attribute($this->env, $this->source, // line 27
(isset($context["mainTaxon"]) || array_key_exists("mainTaxon", $context) ? $context["mainTaxon"] : (function () { throw new RuntimeError('Variable "mainTaxon" does not exist.', 27, $this->source); })()), "id", [], "any", false, false, false, 27), "currentTaxonSlug" => // line 28
(isset($context["currentTaxonSlug"]) || array_key_exists("currentTaxonSlug", $context) ? $context["currentTaxonSlug"] : (function () { throw new RuntimeError('Variable "currentTaxonSlug" does not exist.', 28, $this->source); })()), "template" => "@SyliusShop/Taxon/_verticalMenu.html.twig"]));
// line 30
echo "
";
}
// line 32
echo "
";
// line 33
if (((isset($context["mainTaxon"]) || array_key_exists("mainTaxon", $context) ? $context["mainTaxon"] : (function () { throw new RuntimeError('Variable "mainTaxon" does not exist.', 33, $this->source); })()) && (twig_get_attribute($this->env, $this->source, (isset($context["mainTaxon"]) || array_key_exists("mainTaxon", $context) ? $context["mainTaxon"] : (function () { throw new RuntimeError('Variable "mainTaxon" does not exist.', 33, $this->source); })()), "enabled", [], "any", false, false, false, 33) == true))) {
// line 34
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("app_shop_products_by_label_code_and_taxon_slug", ["labelCode" => "top", "taxonSlug" => twig_get_attribute($this->env, $this->source, // line 36
(isset($context["mainTaxon"]) || array_key_exists("mainTaxon", $context) ? $context["mainTaxon"] : (function () { throw new RuntimeError('Variable "mainTaxon" does not exist.', 36, $this->source); })()), "slug", [], "any", false, false, false, 36), "count" => 5, "template" => "@SyliusShop/Product/Box/_top_products.html.twig"]));
// line 39
echo "
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Index/_sidebar.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 117 => 39, 115 => 36, 113 => 34, 111 => 33, 108 => 32, 104 => 30, 102 => 28, 101 => 27, 99 => 26, 97 => 25, 94 => 24, 90 => 22, 88 => 21, 85 => 20, 83 => 19, 80 => 18, 76 => 16, 74 => 15, 71 => 14, 69 => 13, 66 => 12, 64 => 11, 61 => 10, 59 => 9, 56 => 8, 54 => 7, 51 => 6, 49 => 5, 47 => 4, 45 => 3, 43 => 2,);
}
public function getSourceContext()
{
return new Source("{# taxon.menuAssoc #}
{% set route = app.request.attributes.get('_route') %}
{% set mainTaxon = null %}
{% set currentTaxon = taxon ?? product.mainTaxon ?? null %}
{% set currentTaxonSlug = null %}
{% if currentTaxon and currentTaxon.level == 2 %}
{% set mainTaxon = currentTaxon %}
{% elseif currentTaxon and currentTaxon.parent and currentTaxon.parent.level == 2 %}
{% set mainTaxon = currentTaxon.parent %}
{% elseif currentTaxon and currentTaxon.parent and currentTaxon.parent.parent and currentTaxon.parent.parent.level == 2 %}
{% set mainTaxon = currentTaxon.parent.parent %}
{% elseif currentTaxon and currentTaxon.parent and currentTaxon.parent.parent and currentTaxon.parent.parent.parent and currentTaxon.parent.parent.parent.level == 2 %}
{% set mainTaxon = currentTaxon.parent.parent.parent %}
{% elseif currentTaxon and currentTaxon.parent and currentTaxon.parent.parent and currentTaxon.parent.parent.parent and currentTaxon.parent.parent.parent.parent and currentTaxon.parent.parent.parent.parent.level == 2 %}
{% set mainTaxon = currentTaxon.parent.parent.parent.parent %}
{% endif %}
{% if 'sylius_shop_product_index' == route %}
{% set currentTaxonSlug = app.request.attributes.get('slug') %}
{% elseif 'sylius_shop_product_show' == route and product.mainTaxon is not null and product.mainTaxon.enabled %}
{% set currentTaxonSlug = product.mainTaxon.slug %}
{% endif %}
{% if mainTaxon and currentTaxonSlug %}
{{ render(url('sylius_shop_partial_taxon_show_by_menu_taxon', {
'menuTaxon': mainTaxon.id,
'currentTaxonSlug': currentTaxonSlug,
'template': '@SyliusShop/Taxon/_verticalMenu.html.twig'
})) }}
{% endif %}
{% if mainTaxon and mainTaxon.enabled == true %}
{{ render(url('app_shop_products_by_label_code_and_taxon_slug', {
'labelCode': 'top',
'taxonSlug': mainTaxon.slug,
'count': 5,
'template': '@SyliusShop/Product/Box/_top_products.html.twig'
})) }}
{% endif %}
", "@SyliusShop/Product/Index/_sidebar.html.twig", "/var/www/sudekusa-shop-test/themes/BootstrapChildTheme/SyliusShopBundle/views/Product/Index/_sidebar.html.twig");
}
}