var/cache/dev/twig/5a/5a7adea3db28b8bcf1a77922b0d80a510c6329f9cc00b15f783f3ff53d5c45d8.php line 79

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/diaporama.html.twig */
  14. class __TwigTemplate_1d1745b568c91b9c513e70a80f48da5ae7c84e0109b865fb00166dddfb2ffec0 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/diaporama.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/diaporama.html.twig"));
  33.         // line 1
  34.         echo "<div id=\"carousel-home\">
  35.     <div class=\"owl-carousel owl-theme\">
  36.         ";
  37.         // line 3
  38.         $context['_parent'] = $context;
  39.         $context['_seq'] = twig_ensure_traversable((isset($context["lienDiaporamas"]) || array_key_exists("lienDiaporamas"$context) ? $context["lienDiaporamas"] : (function () { throw new RuntimeError('Variable "lienDiaporamas" does not exist.'3$this->source); })()));
  40.         $context['loop'] = [
  41.           'parent' => $context['_parent'],
  42.           'index0' => 0,
  43.           'index'  => 1,
  44.           'first'  => true,
  45.         ];
  46.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  47.             $length count($context['_seq']);
  48.             $context['loop']['revindex0'] = $length 1;
  49.             $context['loop']['revindex'] = $length;
  50.             $context['loop']['length'] = $length;
  51.             $context['loop']['last'] = === $length;
  52.         }
  53.         foreach ($context['_seq'] as $context["_key"] => $context["lienDiaporama"]) {
  54.             // line 4
  55.             echo "            ";
  56.             if ((twig_get_attribute($this->env$this->source$context["lienDiaporama"], "visible", [], "any"falsefalsefalse4) === true)) {
  57.                 // line 5
  58.                 echo "                ";
  59.                 $context["diaporama"] = twig_get_attribute($this->env$this->source$context["lienDiaporama"], "diaporama", [], "any"falsefalsefalse5);
  60.                 // line 6
  61.                 echo "
  62.                 ";
  63.                 // line 7
  64.                 $context["image"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/img/slides/slide_home_3.jpg");
  65.                 // line 8
  66.                 echo "                ";
  67.                 if ( !(null === twig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'8$this->source); })()), "image", [], "any"falsefalsefalse8))) {
  68.                     // line 9
  69.                     echo "                    ";
  70.                     $context["image"] = $this->env->getRuntime('App\Twig\AppRuntime')->sonataMedia(twig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'9$this->source); })()), "image", [], "any"falsefalsefalse9), "1903_750_thumbnail");
  71.                     // line 10
  72.                     echo "                ";
  73.                 }
  74.                 // line 11
  75.                 echo "
  76.                 <div class=\"owl-slide cover\" style=\"background-image: url('";
  77.                 // line 12
  78.                 echo twig_escape_filter($this->env, (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'12$this->source); })()), "html"nulltrue);
  79.                 echo "');\">
  80.                     <div class=\"opacity-mask d-flex align-items-center\" data-opacity-mask=\"rgba(0, 0, 0, 0.5)\">
  81.                         <div class=\"container\">
  82.                             <div class=\"row justify-content-center justify-content-md-start\">
  83.                                 <div class=\"col-lg-12 static\">
  84.                                     <div class=\"slide-text text-";
  85.                 // line 17
  86.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'17$this->source); })()), "alignement", [], "any"falsefalsefalse17), "html"nulltrue);
  87.                 echo " white\">
  88.                                         ";
  89.                 // line 18
  90.                 if ( !(null === twig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'18$this->source); })()), "titre", [], "any"falsefalsefalse18))) {
  91.                     // line 19
  92.                     echo "                                            ";
  93.                     $context["headingTag"] = "h2";
  94.                     // line 20
  95.                     echo "                                            ";
  96.                     if (twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse20)) {
  97.                         // line 21
  98.                         echo "                                                ";
  99.                         $context["headingTag"] = "h1";
  100.                         // line 22
  101.                         echo "                                            ";
  102.                     }
  103.                     // line 23
  104.                     echo "
  105.                                             <";
  106.                     // line 24
  107.                     echo twig_escape_filter($this->env, (isset($context["headingTag"]) || array_key_exists("headingTag"$context) ? $context["headingTag"] : (function () { throw new RuntimeError('Variable "headingTag" does not exist.'24$this->source); })()), "html"nulltrue);
  108.                     echo " class=\"owl-slide-animated owl-slide-title\">
  109.                                                 ";
  110.                     // line 25
  111.                     echo nl2br(twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'25$this->source); })()), "titre", [], "any"falsefalsefalse25), "html"nulltrue));
  112.                     echo "
  113.                                             </";
  114.                     // line 26
  115.                     echo twig_escape_filter($this->env, (isset($context["headingTag"]) || array_key_exists("headingTag"$context) ? $context["headingTag"] : (function () { throw new RuntimeError('Variable "headingTag" does not exist.'26$this->source); })()), "html"nulltrue);
  116.                     echo ">
  117.                                         ";
  118.                 }
  119.                 // line 28
  120.                 echo "
  121.                                         ";
  122.                 // line 29
  123.                 if ( !(null === twig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'29$this->source); })()), "accroche", [], "any"falsefalsefalse29))) {
  124.                     // line 30
  125.                     echo "                                            <p class=\"owl-slide-animated owl-slide-subtitle\">
  126.                                                 ";
  127.                     // line 31
  128.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'31$this->source); })()), "accroche", [], "any"falsefalsefalse31), "html"nulltrue);
  129.                     echo "
  130.                                             </p>
  131.                                         ";
  132.                 }
  133.                 // line 34
  134.                 echo "
  135.                                         ";
  136.                 // line 35
  137.                 if (( !(null === twig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'35$this->source); })()), "boutonLien", [], "any"falsefalsefalse35)) &&  !(null === twig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'35$this->source); })()), "boutonTitre", [], "any"falsefalsefalse35)))) {
  138.                     // line 36
  139.                     echo "                                            <div class=\"owl-slide-animated owl-slide-cta\">
  140.                                                 <a href=\"";
  141.                     // line 37
  142.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'37$this->source); })()), "boutonLien", [], "any"falsefalsefalse37), "html"nulltrue);
  143.                     echo "\" role=\"button\" class=\"btn_1\" ";
  144.                     if ((twig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'37$this->source); })()), "boutonTarget", [], "any"falsefalsefalse37) === true)) {
  145.                         echo "target=\"_blank\"";
  146.                     }
  147.                     echo ">
  148.                                                     ";
  149.                     // line 38
  150.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["diaporama"]) || array_key_exists("diaporama"$context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.'38$this->source); })()), "boutonTitre", [], "any"falsefalsefalse38), "html"nulltrue);
  151.                     echo "
  152.                                                 </a>
  153.                                             </div>
  154.                                         ";
  155.                 }
  156.                 // line 42
  157.                 echo "                                    </div>
  158.                                 </div>
  159.                             </div>
  160.                         </div>
  161.                     </div>
  162.                 </div>
  163.             ";
  164.             }
  165.             // line 49
  166.             echo "        ";
  167.             ++$context['loop']['index0'];
  168.             ++$context['loop']['index'];
  169.             $context['loop']['first'] = false;
  170.             if (isset($context['loop']['length'])) {
  171.                 --$context['loop']['revindex0'];
  172.                 --$context['loop']['revindex'];
  173.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  174.             }
  175.         }
  176.         $_parent $context['_parent'];
  177.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lienDiaporama'], $context['_parent'], $context['loop']);
  178.         $context array_intersect_key($context$_parent) + $_parent;
  179.         // line 50
  180.         echo "    </div>
  181.     <div id=\"icon_drag_mobile\"></div>
  182. </div>";
  183.         
  184.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  185.         
  186.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  187.     }
  188.     public function getTemplateName()
  189.     {
  190.         return "bloc/diaporama.html.twig";
  191.     }
  192.     public function isTraitable()
  193.     {
  194.         return false;
  195.     }
  196.     public function getDebugInfo()
  197.     {
  198.         return array (  189 => 50,  175 => 49,  166 => 42,  159 => 38,  151 => 37,  148 => 36,  146 => 35,  143 => 34,  137 => 31,  134 => 30,  132 => 29,  129 => 28,  124 => 26,  120 => 25,  116 => 24,  113 => 23,  110 => 22,  107 => 21,  104 => 20,  101 => 19,  99 => 18,  95 => 17,  87 => 12,  84 => 11,  81 => 10,  78 => 9,  75 => 8,  73 => 7,  70 => 6,  67 => 5,  64 => 4,  47 => 3,  43 => 1,);
  199.     }
  200.     public function getSourceContext()
  201.     {
  202.         return new Source("<div id=\"carousel-home\">
  203.     <div class=\"owl-carousel owl-theme\">
  204.         {% for lienDiaporama in lienDiaporamas %}
  205.             {% if lienDiaporama.visible is same as(true) %}
  206.                 {% set diaporama = lienDiaporama.diaporama %}
  207.                 {% set image = asset('build/img/slides/slide_home_3.jpg') %}
  208.                 {% if diaporama.image is not null %}
  209.                     {% set image = sonata_media(diaporama.image, '1903_750_thumbnail') %}
  210.                 {% endif %}
  211.                 <div class=\"owl-slide cover\" style=\"background-image: url('{{ image }}');\">
  212.                     <div class=\"opacity-mask d-flex align-items-center\" data-opacity-mask=\"rgba(0, 0, 0, 0.5)\">
  213.                         <div class=\"container\">
  214.                             <div class=\"row justify-content-center justify-content-md-start\">
  215.                                 <div class=\"col-lg-12 static\">
  216.                                     <div class=\"slide-text text-{{ diaporama.alignement }} white\">
  217.                                         {% if diaporama.titre is not null %}
  218.                                             {% set headingTag = 'h2' %}
  219.                                             {% if loop.first %}
  220.                                                 {% set headingTag = 'h1' %}
  221.                                             {% endif %}
  222.                                             <{{ headingTag }} class=\"owl-slide-animated owl-slide-title\">
  223.                                                 {{ diaporama.titre|nl2br }}
  224.                                             </{{ headingTag }}>
  225.                                         {% endif %}
  226.                                         {% if diaporama.accroche is not null %}
  227.                                             <p class=\"owl-slide-animated owl-slide-subtitle\">
  228.                                                 {{ diaporama.accroche }}
  229.                                             </p>
  230.                                         {% endif %}
  231.                                         {% if diaporama.boutonLien is not null and diaporama.boutonTitre is not null %}
  232.                                             <div class=\"owl-slide-animated owl-slide-cta\">
  233.                                                 <a href=\"{{ diaporama.boutonLien }}\" role=\"button\" class=\"btn_1\" {% if diaporama.boutonTarget is same as(true) %}target=\"_blank\"{% endif %}>
  234.                                                     {{ diaporama.boutonTitre }}
  235.                                                 </a>
  236.                                             </div>
  237.                                         {% endif %}
  238.                                     </div>
  239.                                 </div>
  240.                             </div>
  241.                         </div>
  242.                     </div>
  243.                 </div>
  244.             {% endif %}
  245.         {% endfor %}
  246.     </div>
  247.     <div id=\"icon_drag_mobile\"></div>
  248. </div>""bloc/diaporama.html.twig""/home/promostamt/dev/templates/bloc/diaporama.html.twig");
  249.     }
  250. }