var/cache/dev/twig/c8/c8423e5e378b1ceec8ed1d61533f24d5.php line 166

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. /* common/searchResult.html.twig */
  14. class __TwigTemplate_5fa203a16ead76def8e47e0fe5ab2d47 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_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""common/searchResult.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""common/searchResult.html.twig"));
  33.         // line 12
  34.         echo "
  35. ";
  36.         // line 13
  37.         $macros["selfm"] = $this->macros["selfm"] = $this;
  38.         // line 14
  39.         if ( !array_key_exists("listWithThumbnails"$context)) {
  40.             // line 15
  41.             echo "    ";
  42.             $context["listWithThumbnails"] = false;
  43.         }
  44.         // line 17
  45.         echo "<h1>
  46. \t";
  47.         // line 18
  48.         if ( !array_key_exists("title"$context)) {
  49.             // line 19
  50.             echo "\t\tRecherche : ";
  51.             echo twig_escape_filter($this->env, (isset($context["term"]) || array_key_exists("term"$context) ? $context["term"] : (function () { throw new RuntimeError('Variable "term" does not exist.'19$this->source); })()), "html"nulltrue);
  52.             echo "
  53. \t";
  54.         } else {
  55.             // line 21
  56.             echo "\t\t";
  57.             echo (isset($context["title"]) || array_key_exists("title"$context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.'21$this->source); })());
  58.             echo "
  59. \t";
  60.         }
  61.         // line 23
  62.         echo "</h1>
  63. ";
  64.         // line 27
  65.         if (((( !(isset($context["articles"]) || array_key_exists("articles"$context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.'27$this->source); })()) &&  !(isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'27$this->source); })())) &&  !(isset($context["questionAnswers"]) || array_key_exists("questionAnswers"$context) ? $context["questionAnswers"] : (function () { throw new RuntimeError('Variable "questionAnswers" does not exist.'27$this->source); })())) &&  !(isset($context["structures"]) || array_key_exists("structures"$context) ? $context["structures"] : (function () { throw new RuntimeError('Variable "structures" does not exist.'27$this->source); })()))) {
  66.             // line 28
  67.             echo "\t
  68. \t<p>Votre recherche <strong>";
  69.             // line 29
  70.             echo twig_escape_filter($this->env, (isset($context["term"]) || array_key_exists("term"$context) ? $context["term"] : (function () { throw new RuntimeError('Variable "term" does not exist.'29$this->source); })()), "html"nulltrue);
  71.             echo "</strong> ne donne aucun résultat.</p>
  72. ";
  73.         } else {
  74.             // line 32
  75.             echo "\t<p>
  76. \t\tVoici les résultats de votre recherche : <strong>";
  77.             // line 33
  78.             echo twig_escape_filter($this->env, (isset($context["term"]) || array_key_exists("term"$context) ? $context["term"] : (function () { throw new RuntimeError('Variable "term" does not exist.'33$this->source); })()), "html"nulltrue);
  79.             echo "</strong><br/>
  80. \t\t";
  81.             // line 34
  82.             if ((((array_key_exists("theme"$context) &&  !(null === (isset($context["theme"]) || array_key_exists("theme"$context) ? $context["theme"] : (function () { throw new RuntimeError('Variable "theme" does not exist.'34$this->source); })()))) &&  !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["theme"]) || array_key_exists("theme"$context) ? $context["theme"] : (function () { throw new RuntimeError('Variable "theme" does not exist.'34$this->source); })()), "tags", [], "any"falsefalsefalse34))) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_EDITOR"))) {
  83.                 // line 35
  84.                 echo "\t\t\tLe thème est défini par ces mots-clés : ";
  85.                 echo twig_escape_filter($this->envtwig_join_filter(twig_get_attribute($this->env$this->source, (isset($context["theme"]) || array_key_exists("theme"$context) ? $context["theme"] : (function () { throw new RuntimeError('Variable "theme" does not exist.'35$this->source); })()), "tags", [], "any"falsefalsefalse35), ", "), "html"nulltrue);
  86.                 echo "
  87. \t\t";
  88.             }
  89.             // line 37
  90.             echo "\t</p>
  91. \t<div class=\"resultats-recherche-wrapper\">
  92. \t\t";
  93.             // line 46
  94.             echo "\t\t";
  95.             if ((isset($context["questionAnswers"]) || array_key_exists("questionAnswers"$context) ? $context["questionAnswers"] : (function () { throw new RuntimeError('Variable "questionAnswers" does not exist.'46$this->source); })())) {
  96.                 // line 47
  97.                 echo "\t\t\t";
  98.                 echo twig_call_macro($macros["selfm"], "macro_renderTeasersList", ["App\\Controller\\QuestionAnswerController::showSearchResult", (isset($context["questionAnswers"]) || array_key_exists("questionAnswers"$context) ? $context["questionAnswers"] : (function () { throw new RuntimeError('Variable "questionAnswers" does not exist.'47$this->source); })()), (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails"$context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.'47$this->source); })())], 47$context$this->getSourceContext());
  99.                 echo "
  100. \t\t";
  101.             }
  102.             // line 49
  103.             echo "\t\t";
  104.             if ((isset($context["structures"]) || array_key_exists("structures"$context) ? $context["structures"] : (function () { throw new RuntimeError('Variable "structures" does not exist.'49$this->source); })())) {
  105.                 // line 50
  106.                 echo "\t\t\t";
  107.                 echo twig_call_macro($macros["selfm"], "macro_renderTeasersList", ["App\\Controller\\StructureController::showSearchResult", (isset($context["structures"]) || array_key_exists("structures"$context) ? $context["structures"] : (function () { throw new RuntimeError('Variable "structures" does not exist.'50$this->source); })()), (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails"$context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.'50$this->source); })())], 50$context$this->getSourceContext());
  108.                 echo "
  109. \t\t";
  110.             }
  111.             // line 51
  112.             echo 
  113. \t\t";
  114.             // line 52
  115.             if ((isset($context["articles"]) || array_key_exists("articles"$context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.'52$this->source); })())) {
  116.                 echo "\t
  117. \t\t\t";
  118.                 // line 53
  119.                 echo twig_call_macro($macros["selfm"], "macro_renderTeasersList", ["App\\Controller\\ArticleController::showSearchResult", (isset($context["articles"]) || array_key_exists("articles"$context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.'53$this->source); })()), (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails"$context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.'53$this->source); })())], 53$context$this->getSourceContext());
  120.                 echo "
  121. \t\t";
  122.             }
  123.             // line 55
  124.             echo "\t\t";
  125.             if ((isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'55$this->source); })())) {
  126.                 // line 56
  127.                 echo "\t\t\t";
  128.                 echo twig_call_macro($macros["selfm"], "macro_renderTeasersList", ["App\\Controller\\EventController::showSearchResult", (isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'56$this->source); })()), (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails"$context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.'56$this->source); })())], 56$context$this->getSourceContext());
  129.                 echo "
  130. \t\t";
  131.             }
  132.             // line 58
  133.             echo "\t</div>
  134. ";
  135.         }
  136.         // line 61
  137.         echo "
  138. <p>
  139. \tUne erreur ? Un complément à ajouter ? <a href=\"";
  140.         // line 63
  141.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("contact");
  142.         echo "\"><strong>Signalez-le nous !</strong></a>
  143. </p>
  144. <h2>Vous souhaitez faire une autre recherche ?</h2>
  145. <div class=\"mt-3 mb-4 themes-search\">
  146. \t<p>Faites une <strong>recherche par thème</strong></p>
  147. \t<div class=\"row row-cols-lg-6 row-cols-md-4 row-cols-sm-3 row-cols-3 themes\">
  148. \t\t";
  149.         // line 70
  150.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\ThemeController:showThemes"));
  151.         echo "
  152. \t</div>
  153. </div>
  154. <div class=\"recherche\">
  155. \t<p>Ou <strong>tapez un mot-clé</strong></p>
  156. \t";
  157.         // line 77
  158.         echo "\t";
  159.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\TagController:showTagForm"));
  160.         echo "
  161. \t<p>
  162. \t\t<a href=\"";
  163.         // line 79
  164.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tagsList");
  165.         echo "\">Voir la liste des tags</a>
  166. \t</p>
  167. </div>";
  168.         
  169.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  170.         
  171.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  172.     }
  173.     // line 1
  174.     public function macro_renderTeasersList($__method__ null$__entities__ null$__listWithThumbnails__ false, ...$__varargs__)
  175.     {
  176.         $macros $this->macros;
  177.         $context $this->env->mergeGlobals([
  178.             "method" => $__method__,
  179.             "entities" => $__entities__,
  180.             "listWithThumbnails" => $__listWithThumbnails__,
  181.             "varargs" => $__varargs__,
  182.         ]);
  183.         $blocks = [];
  184.         ob_start();
  185.         try {
  186.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  187.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""renderTeasersList"));
  188.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  189.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""renderTeasersList"));
  190.             // line 2
  191.             echo "    ";
  192.             $context["ids"] = "";
  193.             // line 3
  194.             echo "\t";
  195.             $context['_parent'] = $context;
  196.             $context['_seq'] = twig_ensure_traversable((isset($context["entities"]) || array_key_exists("entities"$context) ? $context["entities"] : (function () { throw new RuntimeError('Variable "entities" does not exist.'3$this->source); })()));
  197.             foreach ($context['_seq'] as $context["_key"] => $context["entity"]) {
  198.                 // line 4
  199.                 echo "\t\t";
  200.                 if (((isset($context["ids"]) || array_key_exists("ids"$context) ? $context["ids"] : (function () { throw new RuntimeError('Variable "ids" does not exist.'4$this->source); })()) == "")) {
  201.                     // line 5
  202.                     echo "\t\t\t";
  203.                     $context["ids"] = ((isset($context["ids"]) || array_key_exists("ids"$context) ? $context["ids"] : (function () { throw new RuntimeError('Variable "ids" does not exist.'5$this->source); })()) . twig_get_attribute($this->env$this->source$context["entity"], "id", [], "any"falsefalsefalse5));
  204.                     // line 6
  205.                     echo "\t\t";
  206.                 } else {
  207.                     // line 7
  208.                     echo "\t\t\t";
  209.                     $context["ids"] = (((isset($context["ids"]) || array_key_exists("ids"$context) ? $context["ids"] : (function () { throw new RuntimeError('Variable "ids" does not exist.'7$this->source); })()) . "-") . twig_get_attribute($this->env$this->source$context["entity"], "id", [], "any"falsefalsefalse7));
  210.                     // line 8
  211.                     echo "\t\t";
  212.                 }
  213.                 // line 9
  214.                 echo "\t";
  215.             }
  216.             $_parent $context['_parent'];
  217.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entity'], $context['_parent'], $context['loop']);
  218.             $context array_intersect_key($context$_parent) + $_parent;
  219.             // line 10
  220.             echo "\t";
  221.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller((isset($context["method"]) || array_key_exists("method"$context) ? $context["method"] : (function () { throw new RuntimeError('Variable "method" does not exist.'10$this->source); })()), ["ids" => (isset($context["ids"]) || array_key_exists("ids"$context) ? $context["ids"] : (function () { throw new RuntimeError('Variable "ids" does not exist.'10$this->source); })()), "listWithThumbnails" => (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails"$context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.'10$this->source); })())]));
  222.             echo "
  223. ";
  224.             
  225.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  226.             
  227.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  228.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  229.         } finally {
  230.             ob_end_clean();
  231.         }
  232.     }
  233.     public function getTemplateName()
  234.     {
  235.         return "common/searchResult.html.twig";
  236.     }
  237.     public function isTraitable()
  238.     {
  239.         return false;
  240.     }
  241.     public function getDebugInfo()
  242.     {
  243.         return array (  244 => 10,  238 => 9,  235 => 8,  232 => 7,  229 => 6,  226 => 5,  223 => 4,  218 => 3,  215 => 2,  194 => 1,  181 => 79,  175 => 77,  166 => 70,  156 => 63,  152 => 61,  147 => 58,  141 => 56,  138 => 55,  133 => 53,  129 => 52,  126 => 51,  120 => 50,  117 => 49,  111 => 47,  108 => 46,  103 => 37,  97 => 35,  95 => 34,  91 => 33,  88 => 32,  82 => 29,  79 => 28,  77 => 27,  71 => 23,  65 => 21,  59 => 19,  57 => 18,  54 => 17,  50 => 15,  48 => 14,  46 => 13,  43 => 12,);
  244.     }
  245.     public function getSourceContext()
  246.     {
  247.         return new Source("{% macro renderTeasersList(method, entities, listWithThumbnails = false) %}
  248.     {% set ids = \"\" %}
  249. \t{% for entity in entities %}
  250. \t\t{% if ids == \"\" %}
  251. \t\t\t{% set ids = ids ~ entity.id %}
  252. \t\t{% else %}
  253. \t\t\t{% set ids = ids ~ \"-\" ~ entity.id %}
  254. \t\t{% endif %}
  255. \t{% endfor %}
  256. \t{{ render(controller(method, {'ids': ids, 'listWithThumbnails': listWithThumbnails})) }}
  257. {% endmacro %}
  258. {% import _self as selfm %}
  259. {% if listWithThumbnails is not defined %}
  260.     {% set listWithThumbnails = false %}
  261. {% endif %}
  262. <h1>
  263. \t{% if title is not defined %}
  264. \t\tRecherche : {{term}}
  265. \t{% else %}
  266. \t\t{{ title|raw }}
  267. \t{% endif %}
  268. </h1>
  269. {% if not articles and not events and not questionAnswers and not structures %}
  270. \t
  271. \t<p>Votre recherche <strong>{{term}}</strong> ne donne aucun résultat.</p>
  272. {% else %}
  273. \t<p>
  274. \t\tVoici les résultats de votre recherche : <strong>{{term}}</strong><br/>
  275. \t\t{% if theme is defined and theme is not null and theme.tags is not empty and is_granted('ROLE_EDITOR') %}
  276. \t\t\tLe thème est défini par ces mots-clés : {{ theme.tags|join(\", \") }}
  277. \t\t{% endif %}
  278. \t</p>
  279. \t<div class=\"resultats-recherche-wrapper\">
  280. \t\t{# 
  281. \t\t{{ dump(articles) }}
  282. \t\t{{ dump(events) }}
  283. \t\t{{ dump(questionAnswers) }}
  284. \t\t{{ dump(structures) }}
  285. \t\t#}
  286. \t\t{% if questionAnswers %}
  287. \t\t\t{{ selfm.renderTeasersList('App\\\\Controller\\\\QuestionAnswerController::showSearchResult', questionAnswers, listWithThumbnails) }}
  288. \t\t{% endif %}
  289. \t\t{% if structures %}
  290. \t\t\t{{ selfm.renderTeasersList('App\\\\Controller\\\\StructureController::showSearchResult', structures, listWithThumbnails) }}
  291. \t\t{% endif %} 
  292. \t\t{% if articles %}\t
  293. \t\t\t{{ selfm.renderTeasersList('App\\\\Controller\\\\ArticleController::showSearchResult', articles, listWithThumbnails) }}
  294. \t\t{% endif %}
  295. \t\t{% if events %}
  296. \t\t\t{{ selfm.renderTeasersList('App\\\\Controller\\\\EventController::showSearchResult', events, listWithThumbnails) }}
  297. \t\t{% endif %}
  298. \t</div>
  299. {% endif %}
  300. <p>
  301. \tUne erreur ? Un complément à ajouter ? <a href=\"{{ path('contact') }}\"><strong>Signalez-le nous !</strong></a>
  302. </p>
  303. <h2>Vous souhaitez faire une autre recherche ?</h2>
  304. <div class=\"mt-3 mb-4 themes-search\">
  305. \t<p>Faites une <strong>recherche par thème</strong></p>
  306. \t<div class=\"row row-cols-lg-6 row-cols-md-4 row-cols-sm-3 row-cols-3 themes\">
  307. \t\t{{ render(controller('App\\\\Controller\\\\ThemeController:showThemes')) }}
  308. \t</div>
  309. </div>
  310. <div class=\"recherche\">
  311. \t<p>Ou <strong>tapez un mot-clé</strong></p>
  312. \t{# {{ form(searchForm) }} #}
  313. \t{{ render(controller('App\\\\Controller\\\\TagController:showTagForm')) }}
  314. \t<p>
  315. \t\t<a href=\"{{ path('tagsList') }}\">Voir la liste des tags</a>
  316. \t</p>
  317. </div>""common/searchResult.html.twig""/home/ovow2306/public_html/ici-grenoble/ici-gre-back-dev/templates/common/searchResult.html.twig");
  318.     }
  319. }