var/cache/dev/twig/0b/0b6b08e0de2fcef711db51aa8b3cac5a29ebab3cf82ad51981f5e69818e6253e.php line 43

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. /* _includes/last-search.html.twig */
  14. class __TwigTemplate_05028b1437bfa97830b9e3107a6f043006f522afb0ab35c3b42fb913465eaa9d 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""_includes/last-search.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""_includes/last-search.html.twig"));
  33.         // line 1
  34.         $context["lastSearch"] = twig_get_attribute($this->env$this->source, (isset($context["historique"]) || array_key_exists("historique"$context) ? $context["historique"] : (function () { throw new RuntimeError('Variable "historique" does not exist.'1$this->source); })()), "getRecherches", [], "method"falsefalsefalse1);
  35.         // line 2
  36.         if ( !twig_test_empty((isset($context["lastSearch"]) || array_key_exists("lastSearch"$context) ? $context["lastSearch"] : (function () { throw new RuntimeError('Variable "lastSearch" does not exist.'2$this->source); })()))) {
  37.             // line 3
  38.             echo "\t<div class=\"nav-block last-search\">
  39. \t\t<p class=\"title\">Mes dernières recherches</p>
  40. \t\t<ul ";
  41.             // line 5
  42.             if ((=== twig_compare(twig_length_filter($this->env, (isset($context["lastSearch"]) || array_key_exists("lastSearch"$context) ? $context["lastSearch"] : (function () { throw new RuntimeError('Variable "lastSearch" does not exist.'5$this->source); })())), 4))) {
  43.                 echo " class=\"slide\" ";
  44.             }
  45.             echo ">
  46. \t\t\t";
  47.             // line 6
  48.             $context['_parent'] = $context;
  49.             $context['_seq'] = twig_ensure_traversable((isset($context["lastSearch"]) || array_key_exists("lastSearch"$context) ? $context["lastSearch"] : (function () { throw new RuntimeError('Variable "lastSearch" does not exist.'6$this->source); })()));
  50.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  51.                 // line 7
  52.                 echo "\t\t\t\t";
  53.                 $context["quoiLibelle"] = $this->extensions['App\Twig\TypeEtablissementLibelleExtension']->typeEtablissementLibelle(twig_replace_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "quoi", [], "any"falsefalsefalse7), "libelle", [], "any"falsefalsefalse7), ["---" => ""]));
  54.                 // line 8
  55.                 echo "\t\t\t\t";
  56.                 if (twig_in_filter("annuaire-enseignement-prive"twig_get_attribute($this->env$this->source$context["item"], "requestUri", [], "any"falsefalsefalse8))) {
  57.                     // line 9
  58.                     echo "\t\t\t\t\t";
  59.                     $context["quoiLibelle"] = "Enseignement privé";
  60.                     // line 10
  61.                     echo "\t\t\t\t";
  62.                 } elseif (twig_in_filter("annuaire-enseignement-catholique"twig_get_attribute($this->env$this->source$context["item"], "requestUri", [], "any"falsefalsefalse10))) {
  63.                     // line 11
  64.                     echo "\t\t\t\t\t";
  65.                     $context["quoiLibelle"] = "Enseignement catholique";
  66.                     // line 12
  67.                     echo "\t\t\t\t";
  68.                 } elseif (twig_in_filter("annuaire"twig_get_attribute($this->env$this->source$context["item"], "requestUri", [], "any"falsefalsefalse12))) {
  69.                     // line 13
  70.                     echo "\t\t\t\t\t";
  71.                     $context["quoiLibelle"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "quoi", [], "any"falsefalsefalse13), "libelle", [], "any"falsefalsefalse13);
  72.                     // line 14
  73.                     echo "\t\t\t\t";
  74.                 }
  75.                 // line 15
  76.                 echo "\t\t\t\t";
  77.                 if ((!== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "lieu", [], "any"falsefalsefalse15), "libelle", [], "any"falsefalsefalse15), "DEFAULT"))) {
  78.                     // line 16
  79.                     echo "\t\t\t\t\t";
  80.                     $context["itemTitle"] = twig_join_filter([=> (isset($context["quoiLibelle"]) || array_key_exists("quoiLibelle"$context) ? $context["quoiLibelle"] : (function () { throw new RuntimeError('Variable "quoiLibelle" does not exist.'16$this->source); })()), => ","=> twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "lieu", [], "any"falsefalsefalse16), "libelle", [], "any"falsefalsefalse16)], " ");
  81.                     // line 17
  82.                     echo "\t\t\t\t\t<li>
  83. \t\t\t\t\t\t<a href=\"#\" class=\"empty-link\"><span data-href=\"";
  84.                     // line 18
  85.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["item"], "requestUri", [], "any"falsefalsefalse18), "html"nulltrue);
  86.                     echo "\">
  87. \t\t\t\t\t\t\t<strong>";
  88.                     // line 19
  89.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString((isset($context["itemTitle"]) || array_key_exists("itemTitle"$context) ? $context["itemTitle"] : (function () { throw new RuntimeError('Variable "itemTitle" does not exist.'19$this->source); })())), "truncate", [=> 50=> "…"=> true], "method"falsefalsefalse19), "html"nulltrue);
  90.                     echo "</strong><br>
  91. \t\t\t\t\t\t\t";
  92.                     // line 20
  93.                     echo $this->extensions['Knp\Bundle\TimeBundle\Twig\Extension\TimeExtension']->diff(twig_get_attribute($this->env$this->source$context["item"], "date", [], "any"falsefalsefalse20));
  94.                     echo "</span></a>
  95. \t\t\t\t\t</li>
  96. \t\t\t\t";
  97.                 } else {
  98.                     // line 23
  99.                     echo "\t\t\t\t\t";
  100.                     $context["itemTitle"] = (isset($context["quoiLibelle"]) || array_key_exists("quoiLibelle"$context) ? $context["quoiLibelle"] : (function () { throw new RuntimeError('Variable "quoiLibelle" does not exist.'23$this->source); })());
  101.                     // line 24
  102.                     echo "\t\t\t\t\t<li>
  103. \t\t\t\t\t\t<a href=\"#\"><span data-href=\"";
  104.                     // line 25
  105.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["item"], "requestUri", [], "any"falsefalsefalse25), "html"nulltrue);
  106.                     echo "\">
  107. \t\t\t\t\t\t\t<strong>";
  108.                     // line 26
  109.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString((isset($context["itemTitle"]) || array_key_exists("itemTitle"$context) ? $context["itemTitle"] : (function () { throw new RuntimeError('Variable "itemTitle" does not exist.'26$this->source); })())), "truncate", [=> 50=> "…"=> true], "method"falsefalsefalse26), "html"nulltrue);
  110.                     echo "</strong><br>
  111. \t\t\t\t\t\t\t";
  112.                     // line 27
  113.                     echo $this->extensions['Knp\Bundle\TimeBundle\Twig\Extension\TimeExtension']->diff(twig_get_attribute($this->env$this->source$context["item"], "date", [], "any"falsefalsefalse27));
  114.                     echo "</span></a>
  115. \t\t\t\t\t</li>
  116. \t\t\t\t";
  117.                 }
  118.                 // line 30
  119.                 echo "\t\t\t";
  120.             }
  121.             $_parent $context['_parent'];
  122.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  123.             $context array_intersect_key($context$_parent) + $_parent;
  124.             // line 31
  125.             echo "\t\t</ul>
  126. \t\t";
  127.             // line 32
  128.             if ((=== twig_compare(twig_length_filter($this->env, (isset($context["lastSearch"]) || array_key_exists("lastSearch"$context) ? $context["lastSearch"] : (function () { throw new RuntimeError('Variable "lastSearch" does not exist.'32$this->source); })())), 4))) {
  129.                 // line 33
  130.                 echo "\t\t\t<span id=\"last-search-prev\"></span>
  131. \t\t\t<span id=\"last-search-next\"></span>
  132. \t\t";
  133.             }
  134.             // line 36
  135.             echo "\t</div>
  136. ";
  137.         }
  138.         
  139.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  140.         
  141.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  142.     }
  143.     public function getTemplateName()
  144.     {
  145.         return "_includes/last-search.html.twig";
  146.     }
  147.     public function isTraitable()
  148.     {
  149.         return false;
  150.     }
  151.     public function getDebugInfo()
  152.     {
  153.         return array (  144 => 36,  139 => 33,  137 => 32,  134 => 31,  128 => 30,  122 => 27,  118 => 26,  114 => 25,  111 => 24,  108 => 23,  102 => 20,  98 => 19,  94 => 18,  91 => 17,  88 => 16,  85 => 15,  82 => 14,  79 => 13,  76 => 12,  73 => 11,  70 => 10,  67 => 9,  64 => 8,  61 => 7,  57 => 6,  51 => 5,  47 => 3,  45 => 2,  43 => 1,);
  154.     }
  155.     public function getSourceContext()
  156.     {
  157.         return new Source("{% set lastSearch = historique.getRecherches() %}
  158. {% if lastSearch is not empty %}
  159. \t<div class=\"nav-block last-search\">
  160. \t\t<p class=\"title\">Mes dernières recherches</p>
  161. \t\t<ul {% if lastSearch | length > 4 %} class=\"slide\" {% endif %}>
  162. \t\t\t{% for item in lastSearch %}
  163. \t\t\t\t{% set quoiLibelle = item.quoi.libelle | replace({'---': ''}) | typeEtablissementLibelle %}
  164. \t\t\t\t{% if 'annuaire-enseignement-prive' in item.requestUri %}
  165. \t\t\t\t\t{% set quoiLibelle = 'Enseignement privé' %}
  166. \t\t\t\t{% elseif 'annuaire-enseignement-catholique' in item.requestUri %}
  167. \t\t\t\t\t{% set quoiLibelle = 'Enseignement catholique' %}
  168. \t\t\t\t{% elseif 'annuaire' in item.requestUri %}
  169. \t\t\t\t\t{% set quoiLibelle = item.quoi.libelle %}
  170. \t\t\t\t{% endif %}
  171. \t\t\t\t{% if item.lieu.libelle != 'DEFAULT' %}
  172. \t\t\t\t\t{% set itemTitle = [quoiLibelle, ',', item.lieu.libelle] | join(' ') %}
  173. \t\t\t\t\t<li>
  174. \t\t\t\t\t\t<a href=\"#\" class=\"empty-link\"><span data-href=\"{{ item.requestUri }}\">
  175. \t\t\t\t\t\t\t<strong>{{ itemTitle | u.truncate(50,  '…', true) }}</strong><br>
  176. \t\t\t\t\t\t\t{{ item.date | ago }}</span></a>
  177. \t\t\t\t\t</li>
  178. \t\t\t\t{% else %}
  179. \t\t\t\t\t{% set itemTitle = quoiLibelle %}
  180. \t\t\t\t\t<li>
  181. \t\t\t\t\t\t<a href=\"#\"><span data-href=\"{{ item.requestUri }}\">
  182. \t\t\t\t\t\t\t<strong>{{ itemTitle | u.truncate(50,  '…', true) }}</strong><br>
  183. \t\t\t\t\t\t\t{{ item.date | ago }}</span></a>
  184. \t\t\t\t\t</li>
  185. \t\t\t\t{% endif %}
  186. \t\t\t{% endfor %}
  187. \t\t</ul>
  188. \t\t{% if lastSearch | length > 4 %}
  189. \t\t\t<span id=\"last-search-prev\"></span>
  190. \t\t\t<span id=\"last-search-next\"></span>
  191. \t\t{% endif %}
  192. \t</div>
  193. {% endif %}
  194. ""_includes/last-search.html.twig""/app/templates/_includes/last-search.html.twig");
  195.     }
  196. }