var/cache/dev/twig/fc/fcb5e98a2419a8f2f8c69a6c112edafc.php line 38

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. use Twig\TemplateWrapper;
  15. /* modules/search-widget/main-results.html.twig */
  16. class __TwigTemplate_f78a13601df627da0f72aec43f8e6c8c extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->parent = false;
  28. $this->blocks = [
  29. ];
  30. }
  31. protected function doDisplay(array $context, array $blocks = []): iterable
  32. {
  33. $macros = $this->macros;
  34. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "modules/search-widget/main-results.html.twig"));
  36. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "modules/search-widget/main-results.html.twig"));
  38. // line 2
  39. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["activeWidgets"]) || array_key_exists("activeWidgets", $context) ? $context["activeWidgets"] : (function () { throw new RuntimeError('Variable "activeWidgets" does not exist.', 2, $this->source); })()), "journey", [], "any", false, false, false, 2)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  40. // line 3
  41. yield "<div id=\"is-Journey-Results\" class=\"is-WidgetResults";
  42. if (((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 3, $this->source); })()) != "journey")) {
  43. yield " is-hide";
  44. }
  45. yield "\"
  46. aria-live=\"polite\" tabindex=\"-1\">
  47. ";
  48. // line 5
  49. yield from $this->load("modules/search-widget/journey/mode-header.html.twig", 5)->unwrap()->yield($context);
  50. // line 6
  51. yield "</div>
  52. ";
  53. }
  54. // line 8
  55. yield "
  56. ";
  57. // line 9
  58. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["activeWidgets"]) || array_key_exists("activeWidgets", $context) ? $context["activeWidgets"] : (function () { throw new RuntimeError('Variable "activeWidgets" does not exist.', 9, $this->source); })()), "schedule", [], "any", false, false, false, 9)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  59. // line 10
  60. yield "<div id=\"is-Schedule-Results\" class=\"is-WidgetResults ";
  61. if ((((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 10, $this->source); })()) != "schedule") || ((array_key_exists("displayScheduleFavorites", $context) && !(isset($context["displayScheduleFavorites"]) || array_key_exists("displayScheduleFavorites", $context) ? $context["displayScheduleFavorites"] : (function () { throw new RuntimeError('Variable "displayScheduleFavorites" does not exist.', 10, $this->source); })())) && (array_key_exists("isRedirection", $context) || array_key_exists("directLink", $context))))) {
  62. yield " is-hide";
  63. }
  64. yield "\">
  65. ";
  66. // line 11
  67. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_REMEMBERED")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  68. // line 12
  69. yield " ";
  70. yield from $this->load("modules/search-widget/schedule/favorites.html.twig", 12)->unwrap()->yield($context);
  71. // line 13
  72. yield " ";
  73. }
  74. // line 14
  75. yield "
  76. ";
  77. // line 15
  78. if (((((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 15, $this->source); })()) == "schedule") && array_key_exists("isXmlHttpMode", $context)) && !(isset($context["isXmlHttpMode"]) || array_key_exists("isXmlHttpMode", $context) ? $context["isXmlHttpMode"] : (function () { throw new RuntimeError('Variable "isXmlHttpMode" does not exist.', 15, $this->source); })()))) {
  79. // line 16
  80. yield " ";
  81. if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["validator"]) || array_key_exists("validator", $context) ? $context["validator"] : (function () { throw new RuntimeError('Variable "validator" does not exist.', 16, $this->source); })()), "error", [], "any", false, false, false, 16) == 1)) {
  82. // line 17
  83. yield " ";
  84. $context['_parent'] = $context;
  85. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["validator"]) || array_key_exists("validator", $context) ? $context["validator"] : (function () { throw new RuntimeError('Variable "validator" does not exist.', 17, $this->source); })()), "errors", [], "any", false, false, false, 17));
  86. foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
  87. // line 18
  88. yield " <div class=\"is-Alert is-Alert_Warning\" role=\"alert\">
  89. <i class=\"is-Icon is-Icon-com-alert-triangle\"></i> ";
  90. // line 19
  91. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["error"], "message", [], "any", false, false, false, 19), "html", null, true);
  92. yield "
  93. </div>
  94. ";
  95. }
  96. $_parent = $context['_parent'];
  97. unset($context['_seq'], $context['_key'], $context['error'], $context['_parent']);
  98. $context = array_intersect_key($context, $_parent) + $_parent;
  99. // line 22
  100. yield " ";
  101. } else {
  102. // line 23
  103. yield " ";
  104. if ((array_key_exists("scheduleTemplate", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["scheduleTemplate"]) || array_key_exists("scheduleTemplate", $context) ? $context["scheduleTemplate"] : (function () { throw new RuntimeError('Variable "scheduleTemplate" does not exist.', 23, $this->source); })())))) {
  105. // line 24
  106. yield " ";
  107. yield from $this->load((("modules/search-widget/schedule/" . (isset($context["scheduleTemplate"]) || array_key_exists("scheduleTemplate", $context) ? $context["scheduleTemplate"] : (function () { throw new RuntimeError('Variable "scheduleTemplate" does not exist.', 24, $this->source); })())) . ".html.twig"), 24)->unwrap()->yield($context);
  108. // line 25
  109. yield " ";
  110. }
  111. // line 26
  112. yield " ";
  113. }
  114. // line 27
  115. yield " ";
  116. }
  117. // line 28
  118. yield "</div>
  119. ";
  120. }
  121. // line 30
  122. yield "
  123. ";
  124. // line 31
  125. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["activeWidgets"]) || array_key_exists("activeWidgets", $context) ? $context["activeWidgets"] : (function () { throw new RuntimeError('Variable "activeWidgets" does not exist.', 31, $this->source); })()), "traffic", [], "any", false, false, false, 31)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  126. // line 32
  127. yield " <div id=\"is-TrafficInfos-Results\" class=\"is-WidgetResults";
  128. if (((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 32, $this->source); })()) != "traffic")) {
  129. yield " is-hide";
  130. }
  131. yield "\" aria-live=\"polite\" tabindex=\"-1\">
  132. ";
  133. // line 33
  134. if ((( !array_key_exists("displayDisruptionWithAjax", $context) || (false == (isset($context["displayDisruptionWithAjax"]) || array_key_exists("displayDisruptionWithAjax", $context) ? $context["displayDisruptionWithAjax"] : (function () { throw new RuntimeError('Variable "displayDisruptionWithAjax" does not exist.', 33, $this->source); })()))) || ((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 33, $this->source); })()) == "traffic"))) {
  135. // line 34
  136. yield " ";
  137. if ((array_key_exists("trafficMini", $context) && (isset($context["trafficMini"]) || array_key_exists("trafficMini", $context) ? $context["trafficMini"] : (function () { throw new RuntimeError('Variable "trafficMini" does not exist.', 34, $this->source); })()))) {
  138. // line 35
  139. yield " ";
  140. yield from $this->load("modules/search-widget/traffic-infos/mini.html.twig", 35)->unwrap()->yield($context);
  141. // line 36
  142. yield " ";
  143. } else {
  144. // line 37
  145. yield " ";
  146. yield from $this->load("modules/search-widget/traffic-infos/traffic-result.html.twig", 37)->unwrap()->yield($context);
  147. // line 38
  148. yield " ";
  149. }
  150. // line 39
  151. yield " ";
  152. }
  153. // line 40
  154. yield " </div>
  155. ";
  156. }
  157. // line 42
  158. yield "
  159. ";
  160. // line 43
  161. if ((CoreExtension::getAttribute($this->env, $this->source, ($context["activeWidgets"] ?? null), "linesAndPoi", [], "any", true, true, false, 43) && CoreExtension::getAttribute($this->env, $this->source, (isset($context["activeWidgets"]) || array_key_exists("activeWidgets", $context) ? $context["activeWidgets"] : (function () { throw new RuntimeError('Variable "activeWidgets" does not exist.', 43, $this->source); })()), "linesAndPoi", [], "any", false, false, false, 43))) {
  162. // line 44
  163. yield " <div id=\"is-LinesAndPoi-Results\" class=\"is-WidgetResults";
  164. if (((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 44, $this->source); })()) != "interactiveMap")) {
  165. yield " is-hide";
  166. }
  167. yield "\" aria-live=\"polite\" tabindex=\"-1\">
  168. ";
  169. // line 45
  170. if (((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 45, $this->source); })()) == "interactiveMap")) {
  171. // line 46
  172. yield " ";
  173. yield from $this->load("modules/search-widget/interactive-map/form.html.twig", 46)->unwrap()->yield($context);
  174. // line 47
  175. yield " ";
  176. }
  177. // line 48
  178. yield " </div>
  179. ";
  180. }
  181. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  182. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  183. yield from [];
  184. }
  185. /**
  186. * @codeCoverageIgnore
  187. */
  188. public function getTemplateName(): string
  189. {
  190. return "modules/search-widget/main-results.html.twig";
  191. }
  192. /**
  193. * @codeCoverageIgnore
  194. */
  195. public function isTraitable(): bool
  196. {
  197. return false;
  198. }
  199. /**
  200. * @codeCoverageIgnore
  201. */
  202. public function getDebugInfo(): array
  203. {
  204. return array ( 187 => 48, 184 => 47, 181 => 46, 179 => 45, 172 => 44, 170 => 43, 167 => 42, 163 => 40, 160 => 39, 157 => 38, 154 => 37, 151 => 36, 148 => 35, 145 => 34, 143 => 33, 136 => 32, 134 => 31, 131 => 30, 127 => 28, 124 => 27, 121 => 26, 118 => 25, 115 => 24, 112 => 23, 109 => 22, 100 => 19, 97 => 18, 92 => 17, 89 => 16, 87 => 15, 84 => 14, 81 => 13, 78 => 12, 76 => 11, 69 => 10, 67 => 9, 64 => 8, 60 => 6, 58 => 5, 50 => 3, 48 => 2,);
  205. }
  206. public function getSourceContext(): Source
  207. {
  208. return new Source("{#{% set activeTab = 'schedule' %}#}
  209. {% if activeWidgets.journey %}
  210. <div id=\"is-Journey-Results\" class=\"is-WidgetResults{% if activeTab != 'journey' %} is-hide{% endif %}\"
  211. aria-live=\"polite\" tabindex=\"-1\">
  212. {% include \"modules/search-widget/journey/mode-header.html.twig\" %}
  213. </div>
  214. {% endif %}
  215. {% if activeWidgets.schedule %}
  216. <div id=\"is-Schedule-Results\" class=\"is-WidgetResults {% if activeTab != 'schedule' or displayScheduleFavorites is defined and not displayScheduleFavorites and (isRedirection is defined or directLink is defined) %} is-hide{% endif %}\">
  217. {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  218. {% include \"modules/search-widget/schedule/favorites.html.twig\" %}
  219. {% endif %}
  220. {% if activeTab == 'schedule' and isXmlHttpMode is defined and not isXmlHttpMode %}
  221. {% if validator.error == 1 %}
  222. {% for error in validator.errors %}
  223. <div class=\"is-Alert is-Alert_Warning\" role=\"alert\">
  224. <i class=\"is-Icon is-Icon-com-alert-triangle\"></i> {{ error.message }}
  225. </div>
  226. {% endfor %}
  227. {% else %}
  228. {% if scheduleTemplate is defined and scheduleTemplate is not empty %}
  229. {% include \"modules/search-widget/schedule/\" ~ scheduleTemplate ~ \".html.twig\" %}
  230. {% endif %}
  231. {% endif %}
  232. {% endif %}
  233. </div>
  234. {% endif %}
  235. {% if activeWidgets.traffic %}
  236. <div id=\"is-TrafficInfos-Results\" class=\"is-WidgetResults{% if activeTab != 'traffic' %} is-hide{% endif %}\" aria-live=\"polite\" tabindex=\"-1\">
  237. {% if (displayDisruptionWithAjax is not defined or false == displayDisruptionWithAjax or activeTab == 'traffic') %}
  238. {% if trafficMini is defined and trafficMini %}
  239. {% include \"modules/search-widget/traffic-infos/mini.html.twig\" %}
  240. {% else %}
  241. {% include \"modules/search-widget/traffic-infos/traffic-result.html.twig\" %}
  242. {% endif %}
  243. {% endif %}
  244. </div>
  245. {% endif %}
  246. {% if activeWidgets.linesAndPoi is defined and activeWidgets.linesAndPoi %}
  247. <div id=\"is-LinesAndPoi-Results\" class=\"is-WidgetResults{% if activeTab != 'interactiveMap' %} is-hide{% endif %}\" aria-live=\"polite\" tabindex=\"-1\">
  248. {% if (activeTab == 'interactiveMap') %}
  249. {% include \"modules/search-widget/interactive-map/form.html.twig\" %}
  250. {% endif %}
  251. </div>
  252. {% endif %}
  253. ", "modules/search-widget/main-results.html.twig", "/var/www/html/templates/modules/search-widget/main-results.html.twig");
  254. }
  255. }