Airship\Cabin\Bridge\Landing\Blog::processDeletePost PHP Method

processDeletePost() protected method

Delete a blog post
protected processDeletePost ( array $post, array $authorsAllowed = [], array $oldPost = [] ) : boolean
$post array
$authorsAllowed array
$oldPost array
return boolean
    protected function processDeletePost(array $post, array $authorsAllowed = [], array $oldPost = []) : bool
    {
        // Extra caution: check permissions again.
        if (!$this->isSuperUser()) {
            if (!$this->can('delete')) {
                // Does this author belong to you?
                if (!\in_array((int) $oldPost['author'], $authorsAllowed)) {
                    return false;
                }
            }
        }
        return $this->blog->deletePost($post, $oldPost);
    }