Use abbr_class
This commit is contained in:
parent
15c52f507e
commit
4663450a03
@ -52,12 +52,10 @@ class SecurityDataCollector extends DataCollector
|
||||
'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 @@ class SecurityDataCollector extends DataCollector
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 %}
|
||||
|
Reference in New Issue
Block a user