Class

eZ\Publish\Core\MVC\Symfony\Security\Authorization\Voter\CoreVoter

class CoreVoter implements VoterInterface

Methods

__construct(Repository $repository)

bool supportsAttribute(string $attribute)

Checks if the voter supports the given attribute.

true supportsClass(string $class)

Checks if the voter supports the given class.

int vote(TokenInterface $token, object $object, array $attributes)

Returns the vote for the given parameters.

Details

at line 23
public __construct(Repository $repository)

Parameters

Repository $repository

at line 35
public bool supportsAttribute(string $attribute)

Checks if the voter supports the given attribute.

Parameters

string $attribute An attribute

Return Value

bool true if this Voter supports the attribute, false otherwise

at line 47
public true supportsClass(string $class)

Checks if the voter supports the given class.

Parameters

string $class A class name

Return Value

true if this Voter can process the class

at line 64
public int vote(TokenInterface $token, object $object, array $attributes)

Returns the vote for the given parameters.

This method must return one of the following constants: ACCESSGRANTED, ACCESSDENIED, or ACCESS_ABSTAIN.

Parameters

TokenInterface $token A TokenInterface instance
object $object The object to secure
array $attributes An array of attributes associated with the method being invoked

Return Value

int either ACCESSGRANTED, ACCESSABSTAIN, or ACCESS_DENIED