public function deleteAction(Page $page)
    {
        if ($page->isDeleted()) {
            $this->hardDelete($page);
        } else {
            $this->softDelete($page);
        }

        $this->getEntityManager()->flush();

        return $this->createJsonResponse(null, 204);
    }
public function deleteAction(Page $page)
    {
        if ($page->isDeleted()) {
            $this->hardDelete($page);
        } else {
            $this->softDelete($page);
        }

        $this->getEntityManager()->flush();

        return $this->createJsonResponse(null, 204);
    }
public function deleteAction ( Page $ page ) { if ( $ page -> isDeleted ( ) ) { $ this -> hardDelete ( $ page ) ; } else { $ this -> softDelete ( $ page ) ; } $ this -> getEntityManager ( ) -> flush ( ) ; return $ this -> createJsonResponse ( null , 204 ) ; }
Delete page.

@return \Symfony\Component\HttpFoundation\Response

@Rest\ParamConverter(name="page", class="BackBee\NestedNode\Page")
Delete page .