<?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/Show/_productsInCategory.html.twig */
class __TwigTemplate_40fb1f53052ebab5c706eab1f0372204ec4f4d7a04dc09840980cb348e13d3c5 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/Product/Show/_productsInCategory.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/Product/Show/_productsInCategory.html.twig"));
// line 1
$context["taxonIds"] = [];
// line 2
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 2, $this->source); })()), "productTaxons", [], "any", false, false, false, 2));
foreach ($context['_seq'] as $context["_key"] => $context["productTaxon"]) {
// line 3
echo " ";
$context["taxonIds"] = twig_array_merge((isset($context["taxonIds"]) || array_key_exists("taxonIds", $context) ? $context["taxonIds"] : (function () { throw new RuntimeError('Variable "taxonIds" does not exist.', 3, $this->source); })()), [0 => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["productTaxon"], "taxon", [], "any", false, false, false, 3), "id", [], "any", false, false, false, 3)]);
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['productTaxon'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 5
echo "
";
// line 6
if ((twig_length_filter($this->env, 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.', 6, $this->source); })()), "productTaxons", [], "any", false, false, false, 6)) > 0)) {
// line 7
echo "<div class=\"bloc-top-content text-center pt-md-4 pt-3\">
<h2 class=\"title-medium text-center\">";
// line 8
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.in_same_category"), "html", null, true);
echo "</h2>
";
// line 9
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("app_shop_partial_products_same_category_index", ["template" => "@SyliusShop/Product/_horizontalList.html.twig", "productId" => 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.', 9, $this->source); })()), "id", [], "any", false, false, false, 9), "taxonIds" => (isset($context["taxonIds"]) || array_key_exists("taxonIds", $context) ? $context["taxonIds"] : (function () { throw new RuntimeError('Variable "taxonIds" does not exist.', 9, $this->source); })())]));
echo "
</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Show/_productsInCategory.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 68 => 9, 64 => 8, 61 => 7, 59 => 6, 56 => 5, 49 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% set taxonIds = [] %}
{% for productTaxon in product.productTaxons %}
{% set taxonIds = taxonIds|merge([productTaxon.taxon.id]) %}
{% endfor %}
{% if product.productTaxons|length > 0 %}
<div class=\"bloc-top-content text-center pt-md-4 pt-3\">
<h2 class=\"title-medium text-center\">{{ 'app.product.in_same_category'|trans }}</h2>
{{ render(url('app_shop_partial_products_same_category_index', {'template': '@SyliusShop/Product/_horizontalList.html.twig', 'productId': product.id, 'taxonIds': taxonIds})) }}
</div>
{% endif %}
", "@SyliusShop/Product/Show/_productsInCategory.html.twig", "/home/chouettemauve/preprod/sylius/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_productsInCategory.html.twig");
}
}