Skip to content

Commit

Permalink
Use abbr_class
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcd committed Dec 20, 2012
1 parent 15c52f5 commit 4663450
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Expand Up @@ -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()),
);
Expand Down Expand Up @@ -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
*/
Expand Down
Expand Up @@ -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 %}
Expand Down

0 comments on commit 4663450

Please sign in to comment.