public function unLink(HTTPRequest $request)
    {
        $ids = $this->getRecordIDList();
        $response = new HTTPBulkToolsResponse(true, $this->gridField);

        try {
            //@todo fix this. seems no ids are returned!
            $response->addSuccessRecords($this->getRecords());
            $this->gridField->list->removeMany($ids);
            $response->setMessage('UnLinked records.');
        } catch (Exception $ex) {
            $response->setStatusCode(500);
            $response->setMessage($ex->getMessage());
        }

        return $response;
    }
public function unLink(HTTPRequest $request)
    {
        $ids = $this->getRecordIDList();
        $response = new HTTPBulkToolsResponse(true, $this->gridField);

        try {
            //@todo fix this. seems no ids are returned!
            $response->addSuccessRecords($this->getRecords());
            $this->gridField->list->removeMany($ids);
            $response->setMessage('UnLinked records.');
        } catch (Exception $ex) {
            $response->setStatusCode(500);
            $response->setMessage($ex->getMessage());
        }

        return $response;
    }
public function unLink ( HTTPRequest $ request ) { $ ids = $ this -> getRecordIDList ( ) ; $ response = new HTTPBulkToolsResponse ( true , $ this -> gridField ) ; try { //@todo fix this. seems no ids are returned! $ response -> addSuccessRecords ( $ this -> getRecords ( ) ) ; $ this -> gridField -> list -> removeMany ( $ ids ) ; $ response -> setMessage ( 'UnLinked records.' ) ; } catch ( Exception $ ex ) { $ response -> setStatusCode ( 500 ) ; $ response -> setMessage ( $ ex -> getMessage ( ) ) ; } return $ response ; }
Unlink the selected records passed from the unlink bulk action.

@param HTTPRequest $request

@return HTTPBulkToolsResponse
Unlink the selected records passed from the unlink bulk action .