class RoleHierarchyVoter extends RoleVoter
RoleHierarchyVoter uses a RoleHierarchy to determine the roles granted to the user before voting.
__construct(RoleHierarchyInterface $roleHierarchy, string $prefix = 'ROLE_') Constructor. | ||
Boolean | supportsAttribute(string $attribute) Checks if the voter supports the given attribute. | from RoleVoter |
Boolean | supportsClass(string $class) Checks if the voter supports the given class. | from RoleVoter |
integer | vote(TokenInterface $token, object $object, array $attributes) Returns the vote for the given parameters. | from RoleVoter |
Constructor.
Checks if the voter supports the given attribute.
Checks if the voter supports the given class.
Returns the vote for the given parameters.
This method must return one of the following constants: ACCESSGRANTED, ACCESSDENIED, or ACCESS_ABSTAIN.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.html