var/cache/dev/twig/32/32821d5014617ef9ed0717d47675f668ae4aa7467d7c62297ac69b5cfed52dd2.php line 80

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. /* partial/diapo-une.html.twig */
  14. class __TwigTemplate_6ca201bb3307e3420afd6f453313f9a0ed29bffc9b953ef5946efb7e951606e9 extends 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""partial/diapo-une.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""partial/diapo-une.html.twig"));
  33.         // line 1
  34.         if ((array_key_exists("diapos"$context) && (<= twig_compare(twig_length_filter($this->env, (isset($context["diapos"]) || array_key_exists("diapos"$context) ? $context["diapos"] : (function () { throw new RuntimeError('Variable "diapos" does not exist.'1$this->source); })())), 5)))) {
  35.             // line 2
  36.             echo "\t<div class=\"block-diapo-une\">
  37. \t\t";
  38.             // line 3
  39.             if ((=== twig_compare((isset($context["type"]) || array_key_exists("type"$context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.'3$this->source); })()), "home"))) {
  40.                 // line 4
  41.                 echo "\t\t\t";
  42.                 // line 5
  43.                 echo "\t\t";
  44.             } else {
  45.                 // line 6
  46.                 echo "\t\t\t<h2>À la une</h2>
  47. \t\t";
  48.             }
  49.             // line 8
  50.             echo "
  51. \t\t<div class=\"cycle-diapo\">
  52. \t\t\t<span id=\"diapo-next\" class=\"next-slide\"></span>
  53. \t\t\t<span id=\"diapo-prev\" class=\"prev-slide\"></span>
  54. \t\t\t";
  55.             // line 12
  56.             $context['_parent'] = $context;
  57.             $context['_seq'] = twig_ensure_traversable((isset($context["diapos"]) || array_key_exists("diapos"$context) ? $context["diapos"] : (function () { throw new RuntimeError('Variable "diapos" does not exist.'12$this->source); })()));
  58.             foreach ($context['_seq'] as $context["_key"] => $context["diapo"]) {
  59.                 // line 13
  60.                 echo "\t\t\t<div class=\"card-diapo\">
  61. \t\t\t\t<a href=\"";
  62.                 // line 14
  63.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["pathBuilder"]) || array_key_exists("pathBuilder"$context) ? $context["pathBuilder"] : (function () { throw new RuntimeError('Variable "pathBuilder" does not exist.'14$this->source); })()), "buildFiche", [=> twig_get_attribute($this->env$this->source$context["diapo"], "etablissement", [], "any"falsefalsefalse14), => ["diapo-id" => twig_get_attribute($this->env$this->source$context["diapo"], "id", [], "any"falsefalsefalse14)]], "method"falsefalsefalse14), "html"nulltrue);
  64.                 echo "\" data-trace-etab=\"";
  65.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["diapo"], "etablissement", [], "any"falsefalsefalse14), "id", [], "any"falsefalsefalse14), "html_attr");
  66.                 echo "\">
  67. \t\t\t\t\t<i class=\"i-diapo\"></i>
  68. \t\t\t\t\t<span class=\"badge-plus\"></span>
  69. \t\t\t\t\t";
  70.                 // line 17
  71.                 if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["diapo"], "photo", [], "any"falsetruefalse17), 0, [], "array"truetruefalse17)) {
  72.                     // line 18
  73.                     echo "\t\t\t\t\t<img src='";
  74.                     echo twig_escape_filter($this->env$this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Vich\UploaderBundle\Twig\Extension\UploaderExtension']->asset(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["diapo"], "photo", [], "any"falsefalsefalse18), 0, [], "array"falsefalsefalse18), "photoFile"), "diapo_small"), "html"nulltrue);
  75.                     echo "' class=\"\"/>
  76. \t\t\t\t\t";
  77.                 }
  78.                 // line 20
  79.                 echo "\t\t\t\t</a>
  80. \t\t\t</div>
  81. \t\t\t";
  82.             }
  83.             $_parent $context['_parent'];
  84.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['diapo'], $context['_parent'], $context['loop']);
  85.             $context array_intersect_key($context$_parent) + $_parent;
  86.             // line 23
  87.             echo "\t\t</div>
  88. \t</div>
  89. ";
  90.         }
  91.         
  92.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  93.         
  94.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  95.     }
  96.     public function getTemplateName()
  97.     {
  98.         return "partial/diapo-une.html.twig";
  99.     }
  100.     public function isTraitable()
  101.     {
  102.         return false;
  103.     }
  104.     public function getDebugInfo()
  105.     {
  106.         return array (  96 => 23,  88 => 20,  82 => 18,  80 => 17,  72 => 14,  69 => 13,  65 => 12,  59 => 8,  55 => 6,  52 => 5,  50 => 4,  48 => 3,  45 => 2,  43 => 1,);
  107.     }
  108.     public function getSourceContext()
  109.     {
  110.         return new Source("{% if diapos is defined and diapos|length >= 5 %}
  111. \t<div class=\"block-diapo-une\">
  112. \t\t{% if type == 'home' %}
  113. \t\t\t{#<h2>DIAPORAMAS</h2>#}
  114. \t\t{% else %}
  115. \t\t\t<h2>À la une</h2>
  116. \t\t{% endif %}
  117. \t\t<div class=\"cycle-diapo\">
  118. \t\t\t<span id=\"diapo-next\" class=\"next-slide\"></span>
  119. \t\t\t<span id=\"diapo-prev\" class=\"prev-slide\"></span>
  120. \t\t\t{% for diapo in diapos  %}
  121. \t\t\t<div class=\"card-diapo\">
  122. \t\t\t\t<a href=\"{{ pathBuilder.buildFiche(diapo.etablissement,{'diapo-id': diapo.id}) }}\" data-trace-etab=\"{{ diapo.etablissement.id | e('html_attr') }}\">
  123. \t\t\t\t\t<i class=\"i-diapo\"></i>
  124. \t\t\t\t\t<span class=\"badge-plus\"></span>
  125. \t\t\t\t\t{% if diapo.photo[0] is defined %}
  126. \t\t\t\t\t<img src='{{vich_uploader_asset(diapo.photo[0], 'photoFile')|imagine_filter('diapo_small')}}' class=\"\"/>
  127. \t\t\t\t\t{% endif %}
  128. \t\t\t\t</a>
  129. \t\t\t</div>
  130. \t\t\t{% endfor %}
  131. \t\t</div>
  132. \t</div>
  133. {% endif %}
  134. ""partial/diapo-une.html.twig""/app/templates/partial/diapo-une.html.twig");
  135.     }
  136. }