public function delete($entity)
    {
        $result = $this->events->shouldExecute($entity, 'before', 'delete');
        if (!$result) {
            return static::DELETION_FAILED_EVENT;
        }
        $result = $this->doDelete($entity, $this->definition->isDeleteCascade());
        $this->events->shouldExecute($entity, 'after', 'delete');
        return $result;
    }