eZ\Publish\Core\MVC\Symfony\Security\Authorization\Voter\ValueObjectVoter::supportsAttribute PHP Method

supportsAttribute() public method

public supportsAttribute ( $attribute )
    public function supportsAttribute($attribute)
    {
        return $attribute instanceof AuthorizationAttribute && isset($attribute->limitations['valueObject']);
    }

Usage Example

 /**
  * @dataProvider supportsAttributeProvider
  */
 public function testSupportsAttribute($attribute, $expectedResult)
 {
     $voter = new ValueObjectVoter($this->repository);
     $this->assertSame($expectedResult, $voter->supportsAttribute($attribute));
 }