Permalink
Browse files

Use abbr_class

  • Loading branch information...
1 parent 575f300 commit cc51d397077ee86fdfc31e99324a360febe1d56b @lmcd lmcd committed Dec 20, 2012
Showing with 3 additions and 5 deletions.
  1. +2 −4 DataCollector/SecurityDataCollector.php
  2. +1 −1 Resources/views/Collector/security.html.twig
@@ -52,12 +52,10 @@ public function collect(Request $request, Response $response, \Exception $except
'roles' => array(),
);
} else {
- $class = explode('\\', get_class($token));
-
$this->data = array(
'enabled' => true,
'authenticated' => $token->isAuthenticated(),
- 'token_class' => end($class),
+ 'token_class' => get_class($token),
'user' => $token->getUsername(),
'roles' => array_map(function ($role){ return $role->getRole();}, $token->getRoles()),
);
@@ -105,7 +103,7 @@ public function isAuthenticated()
}
/**
- * Get the class name of the security token (without namespace).
+ * Get the class name of the security token.
*
* @return String The token
*/
@@ -21,7 +21,7 @@
{% if collector.tokenClass != null %}
<div class="sf-toolbar-info-piece">
<b>Token class</b>
- {{ collector.tokenClass }}
+ {{ collector.tokenClass|abbr_class }}
</div>
{% endif %}
{% elseif collector.enabled %}

0 comments on commit cc51d39

Please sign in to comment.