var/cache/dev/twig/65/651dcd22d8e4493385bddb7e13a7091ead55fa4a515bc518dea4471a6d4d9538.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_a4ffc1dbcaa26cd1fbe6e99ab2b24adcfebd279d2ac3ddabe171732a0915f6e4 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/_associations.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/_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) == "similary_product")) {
  47.                 // line 6
  48.                 echo "        <div class=\"bloc-top-content text-center\">
  49.         ";
  50.                 // line 7
  51.                 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.'7$this->source); })()), "id", [], "any"falsefalsefalse7), "id" => twig_get_attribute($this->env$this->source$context["association"], "id", [], "any"falsefalsefalse7), "template" => "@SyliusShop/Product/Show/_association.html.twig"]));
  52.                 echo "
  53.         </div>
  54.     ";
  55.             } else {
  56.                 // line 10
  57.                 echo "        ";
  58.                 $context["displayNews"] = 1;
  59.                 // line 11
  60.                 echo "    ";
  61.             }
  62.         }
  63.         $_parent $context['_parent'];
  64.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['association'], $context['_parent'], $context['loop']);
  65.         $context array_intersect_key($context$_parent) + $_parent;
  66.         // line 13
  67.         echo "
  68. ";
  69.         // line 14
  70.         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.'14$this->source); })()), "associations", [], "any"falsefalsefalse14)) == 0) || ((isset($context["displayNews"]) || array_key_exists("displayNews"$context) ? $context["displayNews"] : (function () { throw new RuntimeError('Variable "displayNews" does not exist.'14$this->source); })()) == 1))) {
  71.             // line 15
  72.             echo "    <div class=\"bloc-top-content text-center\">
  73.         ";
  74.             // line 17
  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 "
  87.     ";
  88.             // line 22
  89.             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.'22$this->source); })()), "template" => "@SyliusShop/Product/_horizontalListWithHeader.html.twig"]));
  90.             echo "
  91.     </div>
  92. ";
  93.         }
  94.         
  95.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  96.         
  97.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  98.     }
  99.     public function getTemplateName()
  100.     {
  101.         return "@SyliusShop/Product/Show/_associations.html.twig";
  102.     }
  103.     public function isTraitable()
  104.     {
  105.         return false;
  106.     }
  107.     public function getDebugInfo()
  108.     {
  109.         return array (  99 => 22,  96 => 21,  93 => 20,  90 => 19,  87 => 18,  85 => 17,  81 => 15,  79 => 14,  76 => 13,  69 => 11,  66 => 10,  60 => 7,  57 => 6,  54 => 5,  50 => 4,  48 => 3,  45 => 2,  43 => 1,);
  110.     }
  111.     public function getSourceContext()
  112.     {
  113.         return new Source("{% import '@SyliusShop/Common/Macro/sectionHeaders.html.twig' as headers %}
  114. {% set displayNews = 0 %}
  115. {% for association in product.associations  %}
  116.     {% if association.getType().getCode() == \"similary_product\"%}
  117.         <div class=\"bloc-top-content text-center\">
  118.         {{ render(url('sylius_shop_partial_product_association_show', {'productId': product.id, 'id': association.id, 'template': '@SyliusShop/Product/Show/_association.html.twig'})) }}
  119.         </div>
  120.     {% else %}
  121.         {% set displayNews = 1 %}
  122.     {% endif %}
  123. {% endfor %}
  124. {% if (product.associations|length == 0) or (displayNews == 1) %}
  125.     <div class=\"bloc-top-content text-center\">
  126.         {% set countNbProduct_a_completer = app_get_parameter('nb_product_to_complete') %}
  127.         {% if not countNbProduct_a_completer %}
  128.             {% set countNbProduct_a_completer = 4 %}
  129.         {% endif %}
  130.     {{ render(url('sylius_shop_partial_product_index_latest', {'count': countNbProduct_a_completer, 'template': '@SyliusShop/Product/_horizontalListWithHeader.html.twig'})) }}
  131.     </div>
  132. {% endif %}
  133. ""@SyliusShop/Product/Show/_associations.html.twig""/home/chouettemauve/preprod/sylius/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_associations.html.twig");
  134.     }
  135. }