public function delete(EntityInterface $resource, $options = [])
    {
        return (bool)$this->query()->delete()->where([
            $this->getPrimaryKey() => $resource->get($this->getPrimaryKey())
        ])->execute();
    }
public function delete(EntityInterface $resource, $options = [])
    {
        return (bool)$this->query()->delete()->where([
            $this->getPrimaryKey() => $resource->get($this->getPrimaryKey())
        ])->execute();
    }
public function delete ( EntityInterface $ resource , $ options = [ ] ) { return ( bool ) $ this -> query ( ) -> delete ( ) -> where ( [ $ this -> getPrimaryKey ( ) => $ resource -> get ( $ this -> getPrimaryKey ( ) ) ] ) -> execute ( ) ; }
Delete a single resource.

@param \Cake\Datasource\EntityInterface $resource The resource to remove.
@param array|\ArrayAccess $options The options for the delete.
@return bool
Delete a single resource .