public function canEdit(GroupableInterface $groupable, TokenInterface $token): bool
    {
        $user = $token->getUser();
        foreach ($groupable->getGroups() as $group) {
            if ($this->decision_manager->decide($token, ['GROUP_ROLE_EDITOR'], $group)) {
                return true;
            }
        }

        return false;
    }
public function canEdit(GroupableInterface $groupable, TokenInterface $token): bool
    {
        $user = $token->getUser();
        foreach ($groupable->getGroups() as $group) {
            if ($this->decision_manager->decide($token, ['GROUP_ROLE_EDITOR'], $group)) {
                return true;
            }
        }

        return false;
    }
public function canEdit ( GroupableInterface $ groupable , TokenInterface $ token ) : bool { $ user = $ token -> getUser ( ) ; foreach ( $ groupable -> getGroups ( ) as $ group ) { if ( $ this -> decision_manager -> decide ( $ token , [ 'GROUP_ROLE_EDITOR' ] , $ group ) ) { return true ; } } return false ; }
Grants edit access to group editors for groupable entities.

@param GroupableInterface $groupable The groupable subject.
@param TokenInterface     $token     The user token.

@return bool
Grants edit access to group editors for groupable entities .