src/RestfulServer.php
protected function deleteHandler($className, $id)
    {
        $obj = DataObject::get_by_id($className, $id);
        if (!$obj) {
            return $this->notFound();
        }
        if (!$obj->canDelete($this->getMember())) {
            return $this->permissionFailure();
        }

        $obj->delete();

        $this->getResponse()->setStatusCode(204); // No Content
        return true;
    }
protected function deleteHandler($className, $id)
    {
        $obj = DataObject::get_by_id($className, $id);
        if (!$obj) {
            return $this->notFound();
        }
        if (!$obj->canDelete($this->getMember())) {
            return $this->permissionFailure();
        }

        $obj->delete();

        $this->getResponse()->setStatusCode(204); // No Content
        return true;
    }
protected function deleteHandler ( $ className , $ id ) { $ obj = DataObject :: get_by_id ( $ className , $ id ) ; if ( ! $ obj ) { return $ this -> notFound ( ) ; } if ( ! $ obj -> canDelete ( $ this -> getMember ( ) ) ) { return $ this -> permissionFailure ( ) ; } $ obj -> delete ( ) ; $ this -> getResponse ( ) -> setStatusCode ( 204 ) ; // No Content return true ; }
Handler for object delete
Handler for object delete