var/cache/dev/twig/82/82e09c38e3e97a449472fe0c6bba50ab75cb681cfeebb7f1c47369205cdedb29.php line 68

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/Product/Show/_productsInCategory.html.twig */
  14. class __TwigTemplate_40fb1f53052ebab5c706eab1f0372204ec4f4d7a04dc09840980cb348e13d3c5 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/Show/_productsInCategory.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/Show/_productsInCategory.html.twig"));
  33.         // line 1
  34.         $context["taxonIds"] = [];
  35.         // line 2
  36.         $context['_parent'] = $context;
  37.         $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"falsefalsefalse2));
  38.         foreach ($context['_seq'] as $context["_key"] => $context["productTaxon"]) {
  39.             // line 3
  40.             echo "    ";
  41.             $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); })()), [=> twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["productTaxon"], "taxon", [], "any"falsefalsefalse3), "id", [], "any"falsefalsefalse3)]);
  42.         }
  43.         $_parent $context['_parent'];
  44.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['productTaxon'], $context['_parent'], $context['loop']);
  45.         $context array_intersect_key($context$_parent) + $_parent;
  46.         // line 5
  47.         echo "
  48. ";
  49.         // line 6
  50.         if ((twig_length_filter($this->envtwig_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"falsefalsefalse6)) > 0)) {
  51.             // line 7
  52.             echo "<div class=\"bloc-top-content text-center pt-md-4 pt-3\">
  53.     <h2 class=\"title-medium text-center\">";
  54.             // line 8
  55.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.in_same_category"), "html"nulltrue);
  56.             echo "</h2>
  57.     ";
  58.             // line 9
  59.             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"falsefalsefalse9), "taxonIds" => (isset($context["taxonIds"]) || array_key_exists("taxonIds"$context) ? $context["taxonIds"] : (function () { throw new RuntimeError('Variable "taxonIds" does not exist.'9$this->source); })())]));
  60.             echo "
  61. </div>
  62. ";
  63.         }
  64.         
  65.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  66.         
  67.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  68.     }
  69.     public function getTemplateName()
  70.     {
  71.         return "@SyliusShop/Product/Show/_productsInCategory.html.twig";
  72.     }
  73.     public function isTraitable()
  74.     {
  75.         return false;
  76.     }
  77.     public function getDebugInfo()
  78.     {
  79.         return array (  68 => 9,  64 => 8,  61 => 7,  59 => 6,  56 => 5,  49 => 3,  45 => 2,  43 => 1,);
  80.     }
  81.     public function getSourceContext()
  82.     {
  83.         return new Source("{% set taxonIds = [] %}
  84. {% for productTaxon in product.productTaxons %}
  85.     {% set taxonIds = taxonIds|merge([productTaxon.taxon.id]) %}
  86. {% endfor %}
  87. {% if product.productTaxons|length > 0 %}
  88. <div class=\"bloc-top-content text-center pt-md-4 pt-3\">
  89.     <h2 class=\"title-medium text-center\">{{ 'app.product.in_same_category'|trans }}</h2>
  90.     {{ render(url('app_shop_partial_products_same_category_index', {'template': '@SyliusShop/Product/_horizontalList.html.twig', 'productId': product.id, 'taxonIds': taxonIds})) }}
  91. </div>
  92. {% endif %}
  93. ""@SyliusShop/Product/Show/_productsInCategory.html.twig""/home/chouettemauve/preprod/sylius/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_productsInCategory.html.twig");
  94.     }
  95. }