Controllers\xAPI\DocumentController::completeDelete PHP Method

completeDelete() protected method

Completes deletion of $data.
protected completeDelete ( mixed $data = null, boolean $singleDelete = false ) : Response
$data mixed
$singleDelete boolean determines if deleting multiple objects.
return Response
    protected function completeDelete($data = null, $singleDelete = false)
    {
        // Attempts to delete the document.
        $success = $this->document->delete($this->getOptions(), $this->document_type, $data ?: $this->getShowData(), $singleDelete);
        if ($success) {
            return \Response::json(null, 204);
        } else {
            throw new Exceptions\Exception('Could not delete.');
        }
    }