Method | Description | |
---|---|---|
supportsRole ( |
This function is called before we ask the voter to vote. | |
supportsUserClass ( string $userClassName ) : boolean | Voter method that checks if current voter supports the given User class. | |
vote ( |
This function gets the current user object and needs to validate its access against the required roles. |
public supportsRole ( |
||
$role | A Role instances that the current route requires. | |
return | boolean |
public supportsUserClass ( string $userClassName ) : boolean | ||
$userClassName | string | Fully qualified name of the user class with namespace. |
return | boolean | True if Voter supports the class, otherwise false. |