var/cache/website/dev/twig/55/5591adbad841ffce6a7970ad2b2b68f10d4ee5a1ef6a3354e00665a85590ef36.php line 34

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* api/api_search.html.twig */
  15. class __TwigTemplate_f046add4343456f447ccba3522f48eab0eee9b016088018c02ec611364b95331 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->parent false;
  24.         $this->blocks = [
  25.         ];
  26.     }
  27.     protected function doDisplay(array $context, array $blocks = [])
  28.     {
  29.         $macros $this->macros;
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""api/api_search.html.twig"));
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""api/api_search.html.twig"));
  34.         // line 1
  35.         $context["css"] = " dflex fwwrap jcc visible";
  36.         // line 2
  37.         if ((array_key_exists("structure"$context) && ((=== CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure"$context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.'2$this->source); })()), "fiches_territoires")) || (=== CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure"$context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.'2$this->source); })()), "experiences"))))) {
  38.             // line 3
  39.             yield "\t";
  40.             $context["css"] = "";
  41.         }
  42.         // line 5
  43.         yield "
  44. ";
  45.         // line 6
  46.         if (((=== CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure"$context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.'6$this->source); })()), "fiches_territoires")) || (=== CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure"$context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.'6$this->source); })()), "experiences")))) {
  47.             // line 7
  48.             yield "\t<div class=\"map-articles-previews-header\">
  49. \t\t";
  50.             // line 8
  51.             if ((=== CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure"$context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.'8$this->source); })()), "fiches_territoires"))) {
  52.                 // line 9
  53.                 yield "\t\t\tListe des territoires
  54. \t\t";
  55.             } else {
  56.                 // line 11
  57.                 yield "\t\t\tListe des expériences
  58. \t\t";
  59.             }
  60.             // line 13
  61.             yield "\t</div>
  62. ";
  63.         }
  64.         // line 15
  65.         yield "<div class=\"previews-cont";
  66.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["css"]) || array_key_exists("css"$context) ? $context["css"] : (function () { throw new RuntimeError('Variable "css" does not exist.'15$this->source); })()), "html"nulltrue);
  67.         yield "\">
  68. \t";
  69.         // line 16
  70.         $context['_parent'] = $context;
  71.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["hits"]) || array_key_exists("hits"$context) ? $context["hits"] : (function () { throw new RuntimeError('Variable "hits" does not exist.'16$this->source); })()));
  72.         $context['loop'] = [
  73.           'parent' => $context['_parent'],
  74.           'index0' => 0,
  75.           'index'  => 1,
  76.           'first'  => true,
  77.         ];
  78.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  79.             $length count($context['_seq']);
  80.             $context['loop']['revindex0'] = $length 1;
  81.             $context['loop']['revindex'] = $length;
  82.             $context['loop']['length'] = $length;
  83.             $context['loop']['last'] = === $length;
  84.         }
  85.         foreach ($context['_seq'] as $context["i"] => $context["hit"]) {
  86.             // line 17
  87.             yield "\t\t";
  88.             yield from             $this->loadTemplate("api/blocks/api_search_render.html.twig""api/api_search.html.twig"17)->unwrap()->yield(CoreExtension::merge($context, ["id" => CoreExtension::getAttribute($this->env$this->source$context["hit"], "id", [], "any"falsefalsefalse17)]));
  89.             // line 18
  90.             yield "\t";
  91.             ++$context['loop']['index0'];
  92.             ++$context['loop']['index'];
  93.             $context['loop']['first'] = false;
  94.             if (isset($context['loop']['length'])) {
  95.                 --$context['loop']['revindex0'];
  96.                 --$context['loop']['revindex'];
  97.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  98.             }
  99.         }
  100.         $_parent $context['_parent'];
  101.         unset($context['_seq'], $context['_iterated'], $context['i'], $context['hit'], $context['_parent'], $context['loop']);
  102.         $context array_intersect_key($context$_parent) + $_parent;
  103.         // line 19
  104.         yield "</div>
  105. ";
  106.         // line 20
  107.         if (((!== CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure"$context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.'20$this->source); })()), "fiches_territoires")) && (!== CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure"$context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.'20$this->source); })()), "experiences")))) {
  108.             // line 21
  109.             yield "\t";
  110.             yield from             $this->loadTemplate("blocks/sub-blocks/pagination.html.twig""api/api_search.html.twig"21)->unwrap()->yield($context);
  111.         }
  112.         
  113.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  114.         
  115.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  116.         return; yield '';
  117.     }
  118.     /**
  119.      * @codeCoverageIgnore
  120.      */
  121.     public function getTemplateName()
  122.     {
  123.         return "api/api_search.html.twig";
  124.     }
  125.     /**
  126.      * @codeCoverageIgnore
  127.      */
  128.     public function isTraitable()
  129.     {
  130.         return false;
  131.     }
  132.     /**
  133.      * @codeCoverageIgnore
  134.      */
  135.     public function getDebugInfo()
  136.     {
  137.         return array (  118 => 21,  116 => 20,  113 => 19,  99 => 18,  96 => 17,  79 => 16,  74 => 15,  70 => 13,  66 => 11,  62 => 9,  60 => 8,  57 => 7,  55 => 6,  52 => 5,  48 => 3,  46 => 2,  44 => 1,);
  138.     }
  139.     public function getSourceContext()
  140.     {
  141.         return new Source("{% set css = ' dflex fwwrap jcc visible' %}
  142. {% if structure is defined and (structure == 'fiches_territoires' or structure == 'experiences') %}
  143. \t{% set css = '' %}
  144. {% endif %}
  145. {% if structure == 'fiches_territoires' or structure == 'experiences' %}
  146. \t<div class=\"map-articles-previews-header\">
  147. \t\t{% if structure == 'fiches_territoires' %}
  148. \t\t\tListe des territoires
  149. \t\t{% else %}
  150. \t\t\tListe des expériences
  151. \t\t{% endif %}
  152. \t</div>
  153. {% endif %}
  154. <div class=\"previews-cont{{ css }}\">
  155. \t{% for i, hit in hits %}
  156. \t\t{% include \"api/blocks/api_search_render.html.twig\" with {id: hit.id} %}
  157. \t{% endfor %}
  158. </div>
  159. {% if structure != 'fiches_territoires' and structure != 'experiences' %}
  160. \t{% include \"blocks/sub-blocks/pagination.html.twig\" %}
  161. {% endif %}
  162. ""api/api_search.html.twig""/var/www/html/templates/api/api_search.html.twig");
  163.     }
  164. }