<?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;
/* bloc/_bloc_8.html.twig */
class __TwigTemplate_9781c2d1b22bf1fbef924f7dba2640ff1a34f89f898ac3b1b37195f25fc00160 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", "bloc/_bloc_8.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "bloc/_bloc_8.html.twig"));
// line 1
echo "<!-- TYPE_PRODUITS -->
";
// line 2
$context["produits"] = [];
// line 3
echo "
";
// line 4
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", false, false, false, 4))) {
// line 5
echo " ";
// line 6
echo " ";
$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", false, false, false, 6);
} else {
// line 8
echo " ";
$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", false, false, false, 8);
// line 9
echo " ";
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["lienBlocLigneProduit"]) {
// line 10
echo " ";
$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); })()), [0 => twig_get_attribute($this->env, $this->source, $context["lienBlocLigneProduit"], "produit", [], "any", false, false, false, 10)]);
// line 11
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lienBlocLigneProduit'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 13
echo "
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12\">
";
// line 17
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", false, false, false, 17)) || !(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", false, false, false, 17)))) {
// line 18
echo " <div class=\"main_title\">
";
// line 19
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", false, false, false, 19))) {
// line 20
echo " <h2 class=\"bloc-titre main_title\">
";
// line 21
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", false, false, false, 21));
echo "
</h2>
";
}
// line 24
echo "
";
// line 25
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", false, false, false, 25))) {
// line 26
echo " <div class=\"bloc-texte text-wysiwyg\">
";
// line 27
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", false, false, false, 27));
echo "
</div>
";
}
// line 30
echo " </div>
";
}
// line 32
echo " </div>
";
// line 34
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); })()))) {
// line 35
echo " <div class=\"owl-carousel owl-theme list_carousel\">
";
// line 36
$context['_parent'] = $context;
$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); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["produit"]) {
// line 37
echo " ";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(twig_constant("App\\Voter\\ProduitVoter::VIEW"), $context["produit"])) {
// line 38
echo " <div class=\"item\">
";
// line 39
$this->loadTemplate("produit/_unit_liste.html.twig", "bloc/_bloc_8.html.twig", 39)->display(twig_array_merge($context, ["produit" => // line 40
$context["produit"], "declinaison" => twig_get_attribute($this->env, $this->source, // line 41
$context["produit"], "defaultDeclinaison", [], "any", false, false, false, 41), "showButtonMap" => false]));
// line 44
echo " </div>
";
}
// line 46
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['produit'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 47
echo " </div>
";
}
// line 49
echo "
";
// line 50
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", false, false, false, 50)) && !(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", false, false, false, 50)))) {
// line 51
echo " <div class=\"col-12\">
<div class=\"bloc-lien text-center mt-4\">
<a href=\"";
// line 53
echo twig_escape_filter($this->env, 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); })()), "boutonLien", [], "any", false, false, false, 53), "html", null, true);
echo "\" class=\"btn_1\" ";
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", false, false, false, 53) === true)) {
echo "target=\"_blank\"";
}
echo ">
";
// line 54
echo twig_escape_filter($this->env, 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.', 54, $this->source); })()), "boutonTitre", [], "any", false, false, false, 54), "html", null, true);
echo "
</a>
</div>
</div>
";
}
// line 59
echo " </div>
</div>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "bloc/_bloc_8.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("<!-- TYPE_PRODUITS -->
{% set produits = [] %}
{% if bloc.categorie is not null %}
{#{% set produits = bloc.categorie.getProduitsVisibles %}#}
{% set produits = bloc.produits %}
{% else %}
{% set lienBlocLigneProduits = bloc.lienBlocLigneProduitsVisibles %}
{% for lienBlocLigneProduit in lienBlocLigneProduits %}
{% set produits = produits|merge([lienBlocLigneProduit.produit]) %}
{% endfor %}
{% endif %}
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12\">
{% if bloc.titre is not null or bloc.texte is not null %}
<div class=\"main_title\">
{% if bloc.titre is not null %}
<h2 class=\"bloc-titre main_title\">
{{ bloc.titre|prettify|raw }}
</h2>
{% endif %}
{% if bloc.texte is not null %}
<div class=\"bloc-texte text-wysiwyg\">
{{ bloc.texte|wysiswyg|raw }}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% if produits|length %}
<div class=\"owl-carousel owl-theme list_carousel\">
{% for produit in produits %}
{% if is_granted(constant('App\\\\Voter\\\\ProduitVoter::VIEW'), produit) %}
<div class=\"item\">
{% include 'produit/_unit_liste.html.twig' with {
'produit' : produit,
'declinaison' : produit.defaultDeclinaison,
'showButtonMap' : false
} %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if bloc.boutonLien is not null and bloc.boutonTitre is not null %}
<div class=\"col-12\">
<div class=\"bloc-lien text-center mt-4\">
<a href=\"{{ bloc.boutonLien }}\" class=\"btn_1\" {% if bloc.boutonTarget is same as(true) %}target=\"_blank\"{% endif %}>
{{ bloc.boutonTitre }}
</a>
</div>
</div>
{% endif %}
</div>
</div>", "bloc/_bloc_8.html.twig", "/home/promostamt/dev/templates/bloc/_bloc_8.html.twig");
}
}