private function voteForClassContent(TokenInterface $token, AbstractClassContent $content, array $attributes)
    {
        if (null === $content->getProperty('category')) {
            return self::ACCESS_GRANTED;
        }

        if (self::ACCESS_DENIED === $result = $this->voteForObject($token, $content, $attributes)) {
            if (false !== $parent_class = get_parent_class($content)) {
                if ('BackBee\ClassContent\AbstractClassContent' !== $parent_class) {
                    $parent_class = NAMESPACE_SEPARATOR.$parent_class;
                    $result = $this->voteForClassContent($token, new $parent_class('*'), $attributes);
                } else {
                    $objectIdentity = new ObjectIdentity('all', 'BackBee\ClassContent\AbstractClassContent');
                    $result = parent::vote($token, $objectIdentity, $attributes);
                }
            }
        }

        return $result;
    }
private function voteForClassContent(TokenInterface $token, AbstractClassContent $content, array $attributes)
    {
        if (null === $content->getProperty('category')) {
            return self::ACCESS_GRANTED;
        }

        if (self::ACCESS_DENIED === $result = $this->voteForObject($token, $content, $attributes)) {
            if (false !== $parent_class = get_parent_class($content)) {
                if ('BackBee\ClassContent\AbstractClassContent' !== $parent_class) {
                    $parent_class = NAMESPACE_SEPARATOR.$parent_class;
                    $result = $this->voteForClassContent($token, new $parent_class('*'), $attributes);
                } else {
                    $objectIdentity = new ObjectIdentity('all', 'BackBee\ClassContent\AbstractClassContent');
                    $result = parent::vote($token, $objectIdentity, $attributes);
                }
            }
        }

        return $result;
    }
private function voteForClassContent ( TokenInterface $ token , AbstractClassContent $ content , array $ attributes ) { if ( null === $ content -> getProperty ( 'category' ) ) { return self :: ACCESS_GRANTED ; } if ( self :: ACCESS_DENIED === $ result = $ this -> voteForObject ( $ token , $ content , $ attributes ) ) { if ( false !== $ parent_class = get_parent_class ( $ content ) ) { if ( 'BackBee\ClassContent\AbstractClassContent' !== $ parent_class ) { $ parent_class = NAMESPACE_SEPARATOR . $ parent_class ; $ result = $ this -> voteForClassContent ( $ token , new $ parent_class ( '*' ) , $ attributes ) ; } else { $ objectIdentity = new ObjectIdentity ( 'all' , 'BackBee\ClassContent\AbstractClassContent' ) ; $ result = parent :: vote ( $ token , $ objectIdentity , $ attributes ) ; } } } return $ result ; }
Returns the vote for class content object, recursively till AbstractClassContent.

@param \Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token
@param  \BackBee\ClassContent\AbstractClassContent $content
@param  array                                                                $attributes
@return integer                                                              either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED
Returns the vote for class content object recursively till AbstractClassContent .