var/cache/dev/twig/6b/6badcd2cdc9368e589cd1bbc7c64a040.php line 99

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/_associations.html.twig */
  14. class __TwigTemplate_737c91a01cd7346e0b1177908b120cb6 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_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/Show/_associations.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/Show/_associations.html.twig"));
  33.         // line 1
  34.         $macros["headers"] = $this->macros["headers"] = $this->loadTemplate("@SyliusShop/Common/Macro/sectionHeaders.html.twig""@SyliusShop/Product/Show/_associations.html.twig"1)->unwrap();
  35.         // line 2
  36.         echo "
  37. ";
  38.         // line 3
  39.         $context["displayNews"] = 0;
  40.         // line 4
  41.         $context['_parent'] = $context;
  42.         $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.'4$this->source); })()), "associations", [], "any"falsefalsefalse4));
  43.         foreach ($context['_seq'] as $context["_key"] => $context["association"]) {
  44.             // line 5
  45.             echo "    ";
  46.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["association"], "getType", [], "method"falsefalsefalse5), "getCode", [], "method"falsefalsefalse5) == "related_products")) {
  47.                 // line 6
  48.                 echo "    <div class=\"max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk\">
  49.         <div class=\"border rounded-10 bg-white p-3 p-xl-4\">
  50.             ";
  51.                 // line 8
  52.                 echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_product_association_show", ["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.'8$this->source); })()), "id", [], "any"falsefalsefalse8), "id" => twig_get_attribute($this->env$this->source$context["association"], "id", [], "any"falsefalsefalse8), "template" => "@SyliusShop/Product/Show/_association.html.twig"]));
  53.                 echo "
  54.         </div>
  55.     </div>
  56.     ";
  57.             } else {
  58.                 // line 12
  59.                 echo "        ";
  60.                 $context["displayNews"] = 1;
  61.                 // line 13
  62.                 echo "    ";
  63.             }
  64.         }
  65.         $_parent $context['_parent'];
  66.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['association'], $context['_parent'], $context['loop']);
  67.         $context array_intersect_key($context$_parent) + $_parent;
  68.         // line 15
  69.         echo "
  70. ";
  71.         // line 16
  72.         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.'16$this->source); })()), "associations", [], "any"falsefalsefalse16)) == 0) || ((isset($context["displayNews"]) || array_key_exists("displayNews"$context) ? $context["displayNews"] : (function () { throw new RuntimeError('Variable "displayNews" does not exist.'16$this->source); })()) == 1))) {
  73.             // line 17
  74.             echo "    ";
  75.             $context["countNbProduct_a_completer"] = $this->extensions['App\Twig\Extensions\Parameter\ParameterExtension']->getParameter("nb_product_to_complete");
  76.             // line 18
  77.             echo "    ";
  78.             if ( !(isset($context["countNbProduct_a_completer"]) || array_key_exists("countNbProduct_a_completer"$context) ? $context["countNbProduct_a_completer"] : (function () { throw new RuntimeError('Variable "countNbProduct_a_completer" does not exist.'18$this->source); })())) {
  79.                 // line 19
  80.                 echo "        ";
  81.                 $context["countNbProduct_a_completer"] = 4;
  82.                 // line 20
  83.                 echo "    ";
  84.             }
  85.             // line 21
  86.             echo "    <div class=\"max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk\">
  87.         <div class=\"border rounded-10 bg-white p-3 p-xl-4\">
  88.         ";
  89.             // line 23
  90.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_product_index_latest", ["count" => (isset($context["countNbProduct_a_completer"]) || array_key_exists("countNbProduct_a_completer"$context) ? $context["countNbProduct_a_completer"] : (function () { throw new RuntimeError('Variable "countNbProduct_a_completer" does not exist.'23$this->source); })()), "template" => "@SyliusShop/Product/_horizontalListWithHeader.html.twig"]));
  91.             echo "
  92.         </div>
  93.     </div>
  94. ";
  95.         }
  96.         
  97.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  98.         
  99.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  100.     }
  101.     public function getTemplateName()
  102.     {
  103.         return "@SyliusShop/Product/Show/_associations.html.twig";
  104.     }
  105.     public function isTraitable()
  106.     {
  107.         return false;
  108.     }
  109.     public function getDebugInfo()
  110.     {
  111.         return array (  99 => 23,  95 => 21,  92 => 20,  89 => 19,  86 => 18,  83 => 17,  81 => 16,  78 => 15,  71 => 13,  68 => 12,  61 => 8,  57 => 6,  54 => 5,  50 => 4,  48 => 3,  45 => 2,  43 => 1,);
  112.     }
  113.     public function getSourceContext()
  114.     {
  115.         return new Source("{% import '@SyliusShop/Common/Macro/sectionHeaders.html.twig' as headers %}
  116. {% set displayNews = 0 %}
  117. {% for association in product.associations  %}
  118.     {% if association.getType().getCode() == \"related_products\"%}
  119.     <div class=\"max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk\">
  120.         <div class=\"border rounded-10 bg-white p-3 p-xl-4\">
  121.             {{ render(url('sylius_shop_partial_product_association_show', {'productId': product.id, 'id': association.id, 'template': '@SyliusShop/Product/Show/_association.html.twig'})) }}
  122.         </div>
  123.     </div>
  124.     {% else %}
  125.         {% set displayNews = 1 %}
  126.     {% endif %}
  127. {% endfor %}
  128. {% if (product.associations|length == 0) or (displayNews == 1) %}
  129.     {% set countNbProduct_a_completer = app_get_parameter('nb_product_to_complete') %}
  130.     {% if not countNbProduct_a_completer %}
  131.         {% set countNbProduct_a_completer = 4 %}
  132.     {% endif %}
  133.     <div class=\"max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk\">
  134.         <div class=\"border rounded-10 bg-white p-3 p-xl-4\">
  135.         {{ render(url('sylius_shop_partial_product_index_latest', {'count': countNbProduct_a_completer, 'template': '@SyliusShop/Product/_horizontalListWithHeader.html.twig'})) }}
  136.         </div>
  137.     </div>
  138. {% endif %}
  139. ""@SyliusShop/Product/Show/_associations.html.twig""/var/www/html/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_associations.html.twig");
  140.     }
  141. }