PHP Class FOS\UserBundle\Twig\UserExtension

Inheritance: extends Twig_Extensio\Twig_Extension
Afficher le fichier Open project: KnpLabs/KnpUserBundle

Protected Properties

Свойство Type Description
$securityContext

Méthodes publiques

Méthode Description
__construct ( SecurityContext $securityContext )
getFunctions ( ) : array Returns a list of global functions to add to the existing list.
getName ( ) : string Returns the name of the extension.
getUser ( ) : FOS\UserBundle\Model\User Returns the authenticated user, if any
isAnonymous ( ) : boolean Tell whether or not the user is anonymous
isAuthenticated ( ) : boolean Tell whether or not a user is logged in
isUser ( User $user ) : boolean Tells whether the authenticated user is this user

Method Details

__construct() public méthode

public __construct ( SecurityContext $securityContext )
$securityContext Symfony\Component\Security\Core\SecurityContext

getFunctions() public méthode

Returns a list of global functions to add to the existing list.
public getFunctions ( ) : array
Résultat array An array of global functions

getName() public méthode

Returns the name of the extension.
public getName ( ) : string
Résultat string The extension name

getUser() public méthode

Returns the authenticated user, if any
public getUser ( ) : FOS\UserBundle\Model\User
Résultat FOS\UserBundle\Model\User

isAnonymous() public méthode

Tell whether or not the user is anonymous
public isAnonymous ( ) : boolean
Résultat boolean

isAuthenticated() public méthode

Tell whether or not a user is logged in
public isAuthenticated ( ) : boolean
Résultat boolean

isUser() public méthode

Tells whether the authenticated user is this user
public isUser ( User $user ) : boolean
$user User
Résultat boolean

Property Details

$securityContext protected_oe property

protected $securityContext