var/cache/dev/twig/5f/5fe125ffd09536ea91d732fcd4909785.php line 57

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. /* @WebProfiler/Profiler/results.html.twig */
  16. class __TwigTemplate_fd4aed11c410aae971d56f82a72b9d0a 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->blocks = [
  28. 'summary' => [$this, 'block_summary'],
  29. 'panel' => [$this, 'block_panel'],
  30. ];
  31. }
  32. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33. {
  34. // line 1
  35. return "@WebProfiler/Profiler/layout.html.twig";
  36. }
  37. protected function doDisplay(array $context, array $blocks = []): iterable
  38. {
  39. $macros = $this->macros;
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@WebProfiler/Profiler/results.html.twig"));
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@WebProfiler/Profiler/results.html.twig"));
  44. // line 9
  45. $macros["helper"] = $this->macros["helper"] = $this;
  46. // line 1
  47. $this->parent = $this->load("@WebProfiler/Profiler/layout.html.twig", 1);
  48. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  49. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  50. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51. }
  52. // line 11
  53. /**
  54. * @return iterable<null|scalar|\Stringable>
  55. */
  56. public function block_summary(array $context, array $blocks = []): iterable
  57. {
  58. $macros = $this->macros;
  59. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  60. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "summary"));
  61. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  62. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "summary"));
  63. // line 12
  64. yield " <div class=\"status\">
  65. <div class=\"container\">
  66. <h2>Profile Search</h2>
  67. </div>
  68. </div>
  69. ";
  70. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  71. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  72. yield from [];
  73. }
  74. // line 19
  75. /**
  76. * @return iterable<null|scalar|\Stringable>
  77. */
  78. public function block_panel(array $context, array $blocks = []): iterable
  79. {
  80. $macros = $this->macros;
  81. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  82. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "panel"));
  83. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  84. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "panel"));
  85. // line 20
  86. yield " <h2>";
  87. yield (((($tmp = (isset($context["tokens"]) || array_key_exists("tokens", $context) ? $context["tokens"] : (function () { throw new RuntimeError('Variable "tokens" does not exist.', 20, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["tokens"]) || array_key_exists("tokens", $context) ? $context["tokens"] : (function () { throw new RuntimeError('Variable "tokens" does not exist.', 20, $this->source); })())), "html", null, true)) : ("No"));
  88. yield " results found</h2>
  89. ";
  90. // line 22
  91. if ((($tmp = (isset($context["tokens"]) || array_key_exists("tokens", $context) ? $context["tokens"] : (function () { throw new RuntimeError('Variable "tokens" does not exist.', 22, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  92. // line 23
  93. yield " <table id=\"search-results\">
  94. <thead>
  95. <tr>
  96. <th scope=\"col\" class=\"text-center\">Status</th>
  97. <th scope=\"col\">IP</th>
  98. <th scope=\"col\">Method</th>
  99. <th scope=\"col\">URL</th>
  100. <th scope=\"col\">Time</th>
  101. <th scope=\"col\">Token</th>
  102. </tr>
  103. </thead>
  104. <tbody>
  105. ";
  106. // line 35
  107. $context['_parent'] = $context;
  108. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["tokens"]) || array_key_exists("tokens", $context) ? $context["tokens"] : (function () { throw new RuntimeError('Variable "tokens" does not exist.', 35, $this->source); })()));
  109. foreach ($context['_seq'] as $context["_key"] => $context["result"]) {
  110. // line 36
  111. yield " ";
  112. $context["css_class"] = (((((CoreExtension::getAttribute($this->env, $this->source, $context["result"], "status_code", [], "any", true, true, false, 36)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["result"], "status_code", [], "any", false, false, false, 36), 0)) : (0)) > 399)) ? ("status-error") : ((((((CoreExtension::getAttribute($this->env, $this->source, $context["result"], "status_code", [], "any", true, true, false, 36)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["result"], "status_code", [], "any", false, false, false, 36), 0)) : (0)) > 299)) ? ("status-warning") : ("status-success"))));
  113. // line 37
  114. yield "
  115. <tr>
  116. <td class=\"text-center\">
  117. <span class=\"label ";
  118. // line 40
  119. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["css_class"]) || array_key_exists("css_class", $context) ? $context["css_class"] : (function () { throw new RuntimeError('Variable "css_class" does not exist.', 40, $this->source); })()), "html", null, true);
  120. yield "\">";
  121. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, $context["result"], "status_code", [], "any", true, true, false, 40)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["result"], "status_code", [], "any", false, false, false, 40), "n/a")) : ("n/a")), "html", null, true);
  122. yield "</span>
  123. </td>
  124. <td>
  125. <span class=\"nowrap\">";
  126. // line 43
  127. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["result"], "ip", [], "any", false, false, false, 43), "html", null, true);
  128. yield " ";
  129. yield $macros["helper"]->getTemplateForMacro("macro_profile_search_filter", $context, 43, $this->getSourceContext())->macro_profile_search_filter(...[(isset($context["request"]) || array_key_exists("request", $context) ? $context["request"] : (function () { throw new RuntimeError('Variable "request" does not exist.', 43, $this->source); })()), $context["result"], "ip"]);
  130. yield "</span>
  131. </td>
  132. <td>
  133. <span class=\"nowrap\">";
  134. // line 46
  135. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["result"], "method", [], "any", false, false, false, 46), "html", null, true);
  136. yield " ";
  137. yield $macros["helper"]->getTemplateForMacro("macro_profile_search_filter", $context, 46, $this->getSourceContext())->macro_profile_search_filter(...[(isset($context["request"]) || array_key_exists("request", $context) ? $context["request"] : (function () { throw new RuntimeError('Variable "request" does not exist.', 46, $this->source); })()), $context["result"], "method"]);
  138. yield "</span>
  139. </td>
  140. <td class=\"break-long-words\">
  141. ";
  142. // line 49
  143. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["result"], "url", [], "any", false, false, false, 49), "html", null, true);
  144. yield "
  145. ";
  146. // line 50
  147. yield $macros["helper"]->getTemplateForMacro("macro_profile_search_filter", $context, 50, $this->getSourceContext())->macro_profile_search_filter(...[(isset($context["request"]) || array_key_exists("request", $context) ? $context["request"] : (function () { throw new RuntimeError('Variable "request" does not exist.', 50, $this->source); })()), $context["result"], "url"]);
  148. yield "
  149. </td>
  150. <td class=\"text-small\">
  151. <span class=\"nowrap\">";
  152. // line 53
  153. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["result"], "time", [], "any", false, false, false, 53), "d-M-Y"), "html", null, true);
  154. yield "</span>
  155. <span class=\"nowrap newline\">";
  156. // line 54
  157. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["result"], "time", [], "any", false, false, false, 54), "H:i:s"), "html", null, true);
  158. yield "</span>
  159. </td>
  160. <td class=\"nowrap\"><a href=\"";
  161. // line 56
  162. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("_profiler", ["token" => CoreExtension::getAttribute($this->env, $this->source, $context["result"], "token", [], "any", false, false, false, 56)]), "html", null, true);
  163. yield "\">";
  164. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["result"], "token", [], "any", false, false, false, 56), "html", null, true);
  165. yield "</a></td>
  166. </tr>
  167. ";
  168. }
  169. $_parent = $context['_parent'];
  170. unset($context['_seq'], $context['_key'], $context['result'], $context['_parent']);
  171. $context = array_intersect_key($context, $_parent) + $_parent;
  172. // line 59
  173. yield " </tbody>
  174. </table>
  175. ";
  176. } else {
  177. // line 62
  178. yield " <div class=\"empty\">
  179. <p>The query returned no result.</p>
  180. </div>
  181. ";
  182. }
  183. // line 66
  184. yield "
  185. ";
  186. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  187. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  188. yield from [];
  189. }
  190. // line 3
  191. public function macro_profile_search_filter($request = null, $result = null, $property = null, ...$varargs): string|Markup
  192. {
  193. $macros = $this->macros;
  194. $context = [
  195. "request" => $request,
  196. "result" => $result,
  197. "property" => $property,
  198. "varargs" => $varargs,
  199. ] + $this->env->getGlobals();
  200. $blocks = [];
  201. return ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
  202. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  203. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "profile_search_filter"));
  204. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  205. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "profile_search_filter"));
  206. // line 4
  207. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["request"]) || array_key_exists("request", $context) ? $context["request"] : (function () { throw new RuntimeError('Variable "request" does not exist.', 4, $this->source); })()), "hasSession", [], "any", false, false, false, 4)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  208. // line 5
  209. yield "<a href=\"";
  210. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("_profiler_search_results", Twig\Extension\CoreExtension::merge(Twig\Extension\CoreExtension::merge(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["request"]) || array_key_exists("request", $context) ? $context["request"] : (function () { throw new RuntimeError('Variable "request" does not exist.', 5, $this->source); })()), "query", [], "any", false, false, false, 5), "all", [], "any", false, false, false, 5), ["token" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["result"]) || array_key_exists("result", $context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.', 5, $this->source); })()), "token", [], "any", false, false, false, 5)]), [ (string)(isset($context["property"]) || array_key_exists("property", $context) ? $context["property"] : (function () { throw new RuntimeError('Variable "property" does not exist.', 5, $this->source); })()) => CoreExtension::getAttribute($this->env, $this->source, (isset($context["result"]) || array_key_exists("result", $context) ? $context["result"] : (function () { throw new RuntimeError('Variable "result" does not exist.', 5, $this->source); })()), (isset($context["property"]) || array_key_exists("property", $context) ? $context["property"] : (function () { throw new RuntimeError('Variable "property" does not exist.', 5, $this->source); })()), [], "array", false, false, false, 5)])), "html", null, true);
  211. yield "\" title=\"Search\"><span title=\"Search\" class=\"sf-icon sf-search\">";
  212. yield Twig\Extension\CoreExtension::include($this->env, $context, "@WebProfiler/Icon/search.svg");
  213. yield "</span></a>";
  214. }
  215. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  216. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  217. yield from [];
  218. })())) ? '' : new Markup($tmp, $this->env->getCharset());
  219. }
  220. /**
  221. * @codeCoverageIgnore
  222. */
  223. public function getTemplateName(): string
  224. {
  225. return "@WebProfiler/Profiler/results.html.twig";
  226. }
  227. /**
  228. * @codeCoverageIgnore
  229. */
  230. public function isTraitable(): bool
  231. {
  232. return false;
  233. }
  234. /**
  235. * @codeCoverageIgnore
  236. */
  237. public function getDebugInfo(): array
  238. {
  239. return array ( 242 => 5, 240 => 4, 220 => 3, 208 => 66, 202 => 62, 197 => 59, 186 => 56, 181 => 54, 177 => 53, 171 => 50, 167 => 49, 159 => 46, 151 => 43, 143 => 40, 138 => 37, 135 => 36, 131 => 35, 117 => 23, 115 => 22, 109 => 20, 96 => 19, 80 => 12, 67 => 11, 56 => 1, 54 => 9, 41 => 1,);
  240. }
  241. public function getSourceContext(): Source
  242. {
  243. return new Source("{% extends '@WebProfiler/Profiler/layout.html.twig' %}
  244. {% macro profile_search_filter(request, result, property) %}
  245. {%- if request.hasSession -%}
  246. <a href=\"{{ path('_profiler_search_results', request.query.all|merge({token: result.token})|merge({ (property): result[property] })) }}\" title=\"Search\"><span title=\"Search\" class=\"sf-icon sf-search\">{{ include('@WebProfiler/Icon/search.svg') }}</span></a>
  247. {%- endif -%}
  248. {% endmacro %}
  249. {% import _self as helper %}
  250. {% block summary %}
  251. <div class=\"status\">
  252. <div class=\"container\">
  253. <h2>Profile Search</h2>
  254. </div>
  255. </div>
  256. {% endblock %}
  257. {% block panel %}
  258. <h2>{{ tokens ? tokens|length : 'No' }} results found</h2>
  259. {% if tokens %}
  260. <table id=\"search-results\">
  261. <thead>
  262. <tr>
  263. <th scope=\"col\" class=\"text-center\">Status</th>
  264. <th scope=\"col\">IP</th>
  265. <th scope=\"col\">Method</th>
  266. <th scope=\"col\">URL</th>
  267. <th scope=\"col\">Time</th>
  268. <th scope=\"col\">Token</th>
  269. </tr>
  270. </thead>
  271. <tbody>
  272. {% for result in tokens %}
  273. {% set css_class = result.status_code|default(0) > 399 ? 'status-error' : result.status_code|default(0) > 299 ? 'status-warning' : 'status-success' %}
  274. <tr>
  275. <td class=\"text-center\">
  276. <span class=\"label {{ css_class }}\">{{ result.status_code|default('n/a') }}</span>
  277. </td>
  278. <td>
  279. <span class=\"nowrap\">{{ result.ip }} {{ helper.profile_search_filter(request, result, 'ip') }}</span>
  280. </td>
  281. <td>
  282. <span class=\"nowrap\">{{ result.method }} {{ helper.profile_search_filter(request, result, 'method') }}</span>
  283. </td>
  284. <td class=\"break-long-words\">
  285. {{ result.url }}
  286. {{ helper.profile_search_filter(request, result, 'url') }}
  287. </td>
  288. <td class=\"text-small\">
  289. <span class=\"nowrap\">{{ result.time|date('d-M-Y') }}</span>
  290. <span class=\"nowrap newline\">{{ result.time|date('H:i:s') }}</span>
  291. </td>
  292. <td class=\"nowrap\"><a href=\"{{ path('_profiler', { token: result.token }) }}\">{{ result.token }}</a></td>
  293. </tr>
  294. {% endfor %}
  295. </tbody>
  296. </table>
  297. {% else %}
  298. <div class=\"empty\">
  299. <p>The query returned no result.</p>
  300. </div>
  301. {% endif %}
  302. {% endblock %}
  303. ", "@WebProfiler/Profiler/results.html.twig", "/var/www/html/uvdesk-community-v1.1.8/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/results.html.twig");
  304. }
  305. }