class AuthenticatedVoter implements VoterInterface
AuthenticatedVoter votes if an attribute like IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, or IS_AUTHENTICATED_ANONYMOUSLY is present.
This list is most restrictive to least restrictive checking.
Constants
| IS_AUTHENTICATED_FULLY |
|
| IS_AUTHENTICATED_REMEMBERED |
|
| IS_AUTHENTICATED_ANONYMOUSLY |
|
Methods
|
__construct(AuthenticationTrustResolverInterface $authenticationTrustResolver)
Constructor. |
||
| Boolean |
supportsAttribute(string $attribute)
Checks if the voter supports the given attribute. |
|
| true |
supportsClass(string $class)
Checks if the voter supports the given class. |
|
| integer |
vote(TokenInterface $token, object $object, array $attributes)
Returns the vote for the given parameters. |
Details
at line 39
public
__construct(AuthenticationTrustResolverInterface $authenticationTrustResolver)
Constructor.
at line 47
public Boolean
supportsAttribute(string $attribute)
Checks if the voter supports the given attribute.
at line 55
public true
supportsClass(string $class)
Checks if the voter supports the given class.
at line 63
public integer
vote(TokenInterface $token, object $object, array $attributes)
Returns the vote for the given parameters.
This method must return one of the following constants:
ACCESS_GRANTED, ACCESS_DENIED, or ACCESS_ABSTAIN.