public function getGroupPermissions($resource): array
    {
        if ($resource instanceof ResourceInterface) {
            return $this->groupPermissions->getResourcePermissions($resource);
        }

        if (\is_string($resource)) {
            return $this->groupPermissions->getPermissions($resource);
        }

        throw new UnknownResourceTypeException(\get_class($resource));
    }
public function getGroupPermissions($resource): array
    {
        if ($resource instanceof ResourceInterface) {
            return $this->groupPermissions->getResourcePermissions($resource);
        }

        if (\is_string($resource)) {
            return $this->groupPermissions->getPermissions($resource);
        }

        throw new UnknownResourceTypeException(\get_class($resource));
    }
public function getGroupPermissions ( $ resource ) : array { if ( $ resource instanceof ResourceInterface ) { return $ this -> groupPermissions -> getResourcePermissions ( $ resource ) ; } if ( \ is_string ( $ resource ) ) { return $ this -> groupPermissions -> getPermissions ( $ resource ) ; } throw new UnknownResourceTypeException ( \ get_class ( $ resource ) ) ; }
Permissions are an ability to do 'something' with either a 'string' or ResourceInterface as the subject.  Some
permissions are attributed to roles, as defined by your role provider.  This method checks to see if the set of
roles associated to your user, grants access to a specific verb-actions on a resource.

@param ResourceInterface|string $resource

@return GroupPermissionInterface[]
@throws UnknownResourceTypeException
Permissions are an ability to do something with either a string or ResourceInterface as the subject . Some permissions are attributed to roles as defined by your role provider . This method checks to see if the set of roles associated to your user grants access to a specific verb - actions on a resource .