var/cache/dev/twig/c6/c64abad39230102db0e71763e69dc6851052c25bd5ac513331f17c46866e8432.php line 33

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. /* bloc/_bloc_8.html.twig */
  14. class __TwigTemplate_9781c2d1b22bf1fbef924f7dba2640ff1a34f89f898ac3b1b37195f25fc00160 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""bloc/_bloc_8.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""bloc/_bloc_8.html.twig"));
  33.         // line 1
  34.         echo "<!-- TYPE_PRODUITS -->
  35. ";
  36.         // line 2
  37.         $context["produits"] = [];
  38.         // line 3
  39.         echo "
  40. ";
  41.         // line 4
  42.         if ( !(null === twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'4$this->source); })()), "categorie", [], "any"falsefalsefalse4))) {
  43.             // line 5
  44.             echo "    ";
  45.             // line 6
  46.             echo "    ";
  47.             $context["produits"] = twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'6$this->source); })()), "produits", [], "any"falsefalsefalse6);
  48.         } else {
  49.             // line 8
  50.             echo "    ";
  51.             $context["lienBlocLigneProduits"] = twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'8$this->source); })()), "lienBlocLigneProduitsVisibles", [], "any"falsefalsefalse8);
  52.             // line 9
  53.             echo "    ";
  54.             $context['_parent'] = $context;
  55.             $context['_seq'] = twig_ensure_traversable((isset($context["lienBlocLigneProduits"]) || array_key_exists("lienBlocLigneProduits"$context) ? $context["lienBlocLigneProduits"] : (function () { throw new RuntimeError('Variable "lienBlocLigneProduits" does not exist.'9$this->source); })()));
  56.             foreach ($context['_seq'] as $context["_key"] => $context["lienBlocLigneProduit"]) {
  57.                 // line 10
  58.                 echo "        ";
  59.                 $context["produits"] = twig_array_merge((isset($context["produits"]) || array_key_exists("produits"$context) ? $context["produits"] : (function () { throw new RuntimeError('Variable "produits" does not exist.'10$this->source); })()), [=> twig_get_attribute($this->env$this->source$context["lienBlocLigneProduit"], "produit", [], "any"falsefalsefalse10)]);
  60.                 // line 11
  61.                 echo "    ";
  62.             }
  63.             $_parent $context['_parent'];
  64.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lienBlocLigneProduit'], $context['_parent'], $context['loop']);
  65.             $context array_intersect_key($context$_parent) + $_parent;
  66.         }
  67.         // line 13
  68.         echo "
  69. <div class=\"container\">
  70.     <div class=\"row\">
  71.         <div class=\"col-12\">
  72.             ";
  73.         // line 17
  74.         if (( !(null === twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'17$this->source); })()), "titre", [], "any"falsefalsefalse17)) ||  !(null === twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'17$this->source); })()), "texte", [], "any"falsefalsefalse17)))) {
  75.             // line 18
  76.             echo "                <div class=\"main_title\">
  77.                     ";
  78.             // line 19
  79.             if ( !(null === twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'19$this->source); })()), "titre", [], "any"falsefalsefalse19))) {
  80.                 // line 20
  81.                 echo "                        <h2 class=\"bloc-titre main_title\">
  82.                             ";
  83.                 // line 21
  84.                 echo $this->env->getRuntime('App\Twig\AppRuntime')->prettify(twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'21$this->source); })()), "titre", [], "any"falsefalsefalse21));
  85.                 echo "
  86.                         </h2>
  87.                     ";
  88.             }
  89.             // line 24
  90.             echo "
  91.                     ";
  92.             // line 25
  93.             if ( !(null === twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'25$this->source); })()), "texte", [], "any"falsefalsefalse25))) {
  94.                 // line 26
  95.                 echo "                        <div class=\"bloc-texte text-wysiwyg\">
  96.                             ";
  97.                 // line 27
  98.                 echo $this->env->getRuntime('App\Twig\AppRuntime')->wysiswygFormatter(twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'27$this->source); })()), "texte", [], "any"falsefalsefalse27));
  99.                 echo "
  100.                         </div>
  101.                     ";
  102.             }
  103.             // line 30
  104.             echo "                </div>
  105.             ";
  106.         }
  107.         // line 32
  108.         echo "        </div>
  109.         ";
  110.         // line 34
  111.         if (twig_length_filter($this->env, (isset($context["produits"]) || array_key_exists("produits"$context) ? $context["produits"] : (function () { throw new RuntimeError('Variable "produits" does not exist.'34$this->source); })()))) {
  112.             // line 35
  113.             echo "            <div class=\"owl-carousel owl-theme list_carousel\">
  114.                 ";
  115.             // line 36
  116.             $context['_parent'] = $context;
  117.             $context['_seq'] = twig_ensure_traversable((isset($context["produits"]) || array_key_exists("produits"$context) ? $context["produits"] : (function () { throw new RuntimeError('Variable "produits" does not exist.'36$this->source); })()));
  118.             $context['loop'] = [
  119.               'parent' => $context['_parent'],
  120.               'index0' => 0,
  121.               'index'  => 1,
  122.               'first'  => true,
  123.             ];
  124.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  125.                 $length count($context['_seq']);
  126.                 $context['loop']['revindex0'] = $length 1;
  127.                 $context['loop']['revindex'] = $length;
  128.                 $context['loop']['length'] = $length;
  129.                 $context['loop']['last'] = === $length;
  130.             }
  131.             foreach ($context['_seq'] as $context["_key"] => $context["produit"]) {
  132.                 // line 37
  133.                 echo "                    ";
  134.                 if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(twig_constant("App\\Voter\\ProduitVoter::VIEW"), $context["produit"])) {
  135.                     // line 38
  136.                     echo "                        <div class=\"item\">
  137.                             ";
  138.                     // line 39
  139.                     $this->loadTemplate("produit/_unit_liste.html.twig""bloc/_bloc_8.html.twig"39)->display(twig_array_merge($context, ["produit" =>                     // line 40
  140. $context["produit"], "declinaison" => twig_get_attribute($this->env$this->source,                     // line 41
  141. $context["produit"], "defaultDeclinaison", [], "any"falsefalsefalse41), "showButtonMap" => false]));
  142.                     // line 44
  143.                     echo "                        </div>
  144.                     ";
  145.                 }
  146.                 // line 46
  147.                 echo "                ";
  148.                 ++$context['loop']['index0'];
  149.                 ++$context['loop']['index'];
  150.                 $context['loop']['first'] = false;
  151.                 if (isset($context['loop']['length'])) {
  152.                     --$context['loop']['revindex0'];
  153.                     --$context['loop']['revindex'];
  154.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  155.                 }
  156.             }
  157.             $_parent $context['_parent'];
  158.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['produit'], $context['_parent'], $context['loop']);
  159.             $context array_intersect_key($context$_parent) + $_parent;
  160.             // line 47
  161.             echo "            </div>
  162.         ";
  163.         }
  164.         // line 49
  165.         echo "
  166.         ";
  167.         // line 50
  168.         if (( !(null === twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'50$this->source); })()), "boutonLien", [], "any"falsefalsefalse50)) &&  !(null === twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'50$this->source); })()), "boutonTitre", [], "any"falsefalsefalse50)))) {
  169.             // line 51
  170.             echo "            <div class=\"col-12\">
  171.                 <div class=\"bloc-lien text-center mt-4\">
  172.                     <a href=\"";
  173.             // line 53
  174.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'53$this->source); })()), "boutonLien", [], "any"falsefalsefalse53), "html"nulltrue);
  175.             echo "\" class=\"btn_1\" ";
  176.             if ((twig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'53$this->source); })()), "boutonTarget", [], "any"falsefalsefalse53) === true)) {
  177.                 echo "target=\"_blank\"";
  178.             }
  179.             echo ">
  180.                         ";
  181.             // line 54
  182.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["bloc"]) || array_key_exists("bloc"$context) ? $context["bloc"] : (function () { throw new RuntimeError('Variable "bloc" does not exist.'54$this->source); })()), "boutonTitre", [], "any"falsefalsefalse54), "html"nulltrue);
  183.             echo "
  184.                     </a>
  185.                 </div>
  186.             </div>
  187.         ";
  188.         }
  189.         // line 59
  190.         echo "    </div>
  191. </div>";
  192.         
  193.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  194.         
  195.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  196.     }
  197.     public function getTemplateName()
  198.     {
  199.         return "bloc/_bloc_8.html.twig";
  200.     }
  201.     public function isTraitable()
  202.     {
  203.         return false;
  204.     }
  205.     public function getDebugInfo()
  206.     {
  207.         return array (  200 => 59,  192 => 54,  184 => 53,  180 => 51,  178 => 50,  175 => 49,  171 => 47,  157 => 46,  153 => 44,  151 => 41,  150 => 40,  149 => 39,  146 => 38,  143 => 37,  126 => 36,  123 => 35,  121 => 34,  117 => 32,  113 => 30,  107 => 27,  104 => 26,  102 => 25,  99 => 24,  93 => 21,  90 => 20,  88 => 19,  85 => 18,  83 => 17,  77 => 13,  70 => 11,  67 => 10,  62 => 9,  59 => 8,  55 => 6,  53 => 5,  51 => 4,  48 => 3,  46 => 2,  43 => 1,);
  208.     }
  209.     public function getSourceContext()
  210.     {
  211.         return new Source("<!-- TYPE_PRODUITS -->
  212. {% set produits = [] %}
  213. {% if bloc.categorie is not null %}
  214.     {#{% set produits = bloc.categorie.getProduitsVisibles %}#}
  215.     {% set produits = bloc.produits %}
  216. {% else %}
  217.     {% set lienBlocLigneProduits = bloc.lienBlocLigneProduitsVisibles %}
  218.     {% for lienBlocLigneProduit in lienBlocLigneProduits %}
  219.         {% set produits = produits|merge([lienBlocLigneProduit.produit]) %}
  220.     {% endfor %}
  221. {% endif %}
  222. <div class=\"container\">
  223.     <div class=\"row\">
  224.         <div class=\"col-12\">
  225.             {% if bloc.titre is not null or bloc.texte is not null %}
  226.                 <div class=\"main_title\">
  227.                     {% if bloc.titre is not null %}
  228.                         <h2 class=\"bloc-titre main_title\">
  229.                             {{ bloc.titre|prettify|raw }}
  230.                         </h2>
  231.                     {% endif %}
  232.                     {% if bloc.texte is not null %}
  233.                         <div class=\"bloc-texte text-wysiwyg\">
  234.                             {{ bloc.texte|wysiswyg|raw }}
  235.                         </div>
  236.                     {% endif %}
  237.                 </div>
  238.             {% endif %}
  239.         </div>
  240.         {% if produits|length %}
  241.             <div class=\"owl-carousel owl-theme list_carousel\">
  242.                 {% for produit in produits %}
  243.                     {% if is_granted(constant('App\\\\Voter\\\\ProduitVoter::VIEW'), produit) %}
  244.                         <div class=\"item\">
  245.                             {% include 'produit/_unit_liste.html.twig' with {
  246.                                 'produit' : produit,
  247.                                 'declinaison' : produit.defaultDeclinaison,
  248.                                 'showButtonMap' : false
  249.                             } %}
  250.                         </div>
  251.                     {% endif %}
  252.                 {% endfor %}
  253.             </div>
  254.         {% endif %}
  255.         {% if bloc.boutonLien is not null and bloc.boutonTitre is not null %}
  256.             <div class=\"col-12\">
  257.                 <div class=\"bloc-lien text-center mt-4\">
  258.                     <a href=\"{{ bloc.boutonLien }}\" class=\"btn_1\" {% if bloc.boutonTarget is same as(true) %}target=\"_blank\"{% endif %}>
  259.                         {{ bloc.boutonTitre }}
  260.                     </a>
  261.                 </div>
  262.             </div>
  263.         {% endif %}
  264.     </div>
  265. </div>""bloc/_bloc_8.html.twig""/home/promostamt/dev/templates/bloc/_bloc_8.html.twig");
  266.     }
  267. }