plugin/blog/Controller/API/PostController.php
public function deletePostAction(Request $request, Blog $blog, Post $post, User $user)
    {
        $this->checkPermission('EDIT', $blog->getResourceNode(), [], true);
        $this->postManager->deletePost($blog, $post, $user);

        return new JsonResponse($post->getId());
    }
public function deletePostAction(Request $request, Blog $blog, Post $post, User $user)
    {
        $this->checkPermission('EDIT', $blog->getResourceNode(), [], true);
        $this->postManager->deletePost($blog, $post, $user);

        return new JsonResponse($post->getId());
    }
public function deletePostAction ( Request $ request , Blog $ blog , Post $ post , User $ user ) { $ this -> checkPermission ( 'EDIT' , $ blog -> getResourceNode ( ) , [ ] , true ) ; $ this -> postManager -> deletePost ( $ blog , $ post , $ user ) ; return new JsonResponse ( $ post -> getId ( ) ) ; }
Delete blog post.

@EXT\Route("/delete/{postId}", name="apiv2_blog_post_delete")
@EXT\Method("DELETE")
@EXT\ParamConverter("post", class="IcapBlogBundle:Post", options={"mapping": {"postId": "uuid"}})
@EXT\ParamConverter("user", converter="current_user", options={"allowAnonymous"=false})

@param Blog $blog
@param Post $post
@param User $user

@return array
Delete blog post .