PageRenderTime 53ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/app/cache/prod/twig/be/eb/f2500b46d6af0680f4e43832884e.php

https://bitbucket.org/pyneff/carsharing
PHP | 205 lines | 159 code | 11 blank | 35 comment | 13 complexity | b872a27c884fd3c8fb5f782ec2838a0e MD5 | raw file
Possible License(s): Apache-2.0, LGPL-3.0, BSD-3-Clause, BSD-2-Clause
  1. <?php
  2. /* SecurityBundle:Collector:security.html.twig */
  3. class __TwigTemplate_beebf2500b46d6af0680f4e43832884e extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. $this->parent = $this->env->loadTemplate("WebProfilerBundle:Profiler:layout.html.twig");
  9. $this->blocks = array(
  10. 'toolbar' => array($this, 'block_toolbar'),
  11. 'menu' => array($this, 'block_menu'),
  12. 'panel' => array($this, 'block_panel'),
  13. );
  14. }
  15. protected function doGetParent(array $context)
  16. {
  17. return "WebProfilerBundle:Profiler:layout.html.twig";
  18. }
  19. protected function doDisplay(array $context, array $blocks = array())
  20. {
  21. $this->parent->display($context, array_merge($this->blocks, $blocks));
  22. }
  23. // line 3
  24. public function block_toolbar($context, array $blocks = array())
  25. {
  26. // line 4
  27. echo " ";
  28. if ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "user")) {
  29. // line 5
  30. echo " ";
  31. $context["color_code"] = ((($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "enabled") && $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "authenticated"))) ? ("green") : ("yellow"));
  32. // line 6
  33. echo " ";
  34. $context["authentication_color_code"] = ((($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "enabled") && $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "authenticated"))) ? ("green") : ("red"));
  35. // line 7
  36. echo " ";
  37. $context["authentication_color_text"] = ((($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "enabled") && $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "authenticated"))) ? ("Yes") : ("No"));
  38. // line 8
  39. echo " ";
  40. } else {
  41. // line 9
  42. echo " ";
  43. $context["color_code"] = (($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "enabled")) ? ("red") : ("black"));
  44. // line 10
  45. echo " ";
  46. }
  47. // line 11
  48. echo " ";
  49. ob_start();
  50. // line 12
  51. echo " ";
  52. if ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "user")) {
  53. // line 13
  54. echo " <div class=\"sf-toolbar-info-piece\">
  55. <b>Logged in as</b>
  56. <span class=\"sf-toolbar-status sf-toolbar-status-";
  57. // line 15
  58. echo twig_escape_filter($this->env, (isset($context["color_code"]) ? $context["color_code"] : null), "html", null, true);
  59. echo "\">";
  60. echo twig_escape_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "user"), "html", null, true);
  61. echo "</span>
  62. </div>
  63. <div class=\"sf-toolbar-info-piece\">
  64. <b>Authenticated</b>
  65. <span class=\"sf-toolbar-status sf-toolbar-status-";
  66. // line 19
  67. echo twig_escape_filter($this->env, (isset($context["authentication_color_code"]) ? $context["authentication_color_code"] : null), "html", null, true);
  68. echo "\">";
  69. echo twig_escape_filter($this->env, (isset($context["authentication_color_text"]) ? $context["authentication_color_text"] : null), "html", null, true);
  70. echo "</span>
  71. </div>
  72. ";
  73. } elseif ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "enabled")) {
  74. // line 22
  75. echo " You are not authenticated.
  76. ";
  77. } else {
  78. // line 24
  79. echo " The security is disabled.
  80. ";
  81. }
  82. // line 26
  83. echo " ";
  84. $context["text"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  85. // line 27
  86. echo " ";
  87. ob_start();
  88. // line 28
  89. echo " <img width=\"24\" height=\"28\" alt=\"Security\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAcCAYAAAB75n/uAAAC70lEQVR42u2V3Ut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ape_filter($this->env, (isset($context["color_code"]) ? $context["color_code"] : null), "html", null, true);
  93. echo "\"></span>
  94. ";
  95. // line 30
  96. if ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "user")) {
  97. echo "<div class=\"sf-toolbar-status sf-toolbar-info-piece-additional\">";
  98. echo twig_escape_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "user"), "html", null, true);
  99. echo "</div>";
  100. }
  101. // line 31
  102. echo " ";
  103. $context["icon"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  104. // line 32
  105. echo " ";
  106. $this->env->loadTemplate("WebProfilerBundle:Profiler:toolbar_item.html.twig")->display(array_merge($context, array("link" => (isset($context["profiler_url"]) ? $context["profiler_url"] : null))));
  107. }
  108. // line 35
  109. public function block_menu($context, array $blocks = array())
  110. {
  111. // line 36
  112. echo "<span class=\"label\">
  113. <span class=\"icon\"><img src=\"";
  114. // line 37
  115. echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/webprofiler/images/profiler/security.png"), "html", null, true);
  116. echo "\" alt=\"\" /></span>
  117. <strong>Security</strong>
  118. </span>
  119. ";
  120. }
  121. // line 42
  122. public function block_panel($context, array $blocks = array())
  123. {
  124. // line 43
  125. echo " <h2>Security</h2>
  126. ";
  127. // line 44
  128. if ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "user")) {
  129. // line 45
  130. echo " <table>
  131. <tr>
  132. <th>Username</th>
  133. <td>";
  134. // line 48
  135. echo twig_escape_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "user"), "html", null, true);
  136. echo "</td>
  137. </tr>
  138. <tr>
  139. <th>Authenticated?</th>
  140. <td>
  141. ";
  142. // line 53
  143. if ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "authenticated")) {
  144. // line 54
  145. echo " yes
  146. ";
  147. } else {
  148. // line 56
  149. echo " no ";
  150. if ((!twig_length_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "roles")))) {
  151. echo "<em>(probably because the user has no roles)</em>";
  152. }
  153. // line 57
  154. echo " ";
  155. }
  156. // line 58
  157. echo " </td>
  158. </tr>
  159. <tr>
  160. <th>Roles</th>
  161. <td>";
  162. // line 62
  163. echo twig_escape_filter($this->env, $this->env->getExtension('yaml')->encode($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "roles")), "html", null, true);
  164. echo "</td>
  165. </tr>
  166. </table>
  167. ";
  168. } elseif ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "enabled")) {
  169. // line 66
  170. echo " <p>
  171. <em>No token</em>
  172. </p>
  173. ";
  174. } else {
  175. // line 70
  176. echo " <p>
  177. <em>The security component is disabled</em>
  178. </p>
  179. ";
  180. }
  181. }
  182. public function getTemplateName()
  183. {
  184. return "SecurityBundle:Collector:security.html.twig";
  185. }
  186. public function isTraitable()
  187. {
  188. return false;
  189. }
  190. public function getDebugInfo()
  191. {
  192. return array ( 182 => 70, 176 => 66, 169 => 62, 163 => 58, 160 => 57, 155 => 56, 151 => 54, 149 => 53, 141 => 48, 136 => 45, 134 => 44, 131 => 43, 128 => 42, 120 => 37, 117 => 36, 114 => 35, 109 => 32, 106 => 31, 100 => 30, 96 => 29, 93 => 28, 90 => 27, 87 => 26, 83 => 24, 79 => 22, 71 => 19, 62 => 15, 58 => 13, 55 => 12, 52 => 11, 49 => 10, 46 => 9, 43 => 8, 40 => 7, 37 => 6, 34 => 5, 31 => 4, 28 => 3,);
  193. }
  194. }