public function Lingotek::deleteDocument in Lingotek Translation 8.2
Same name and namespace in other branches
- 8 src/Lingotek.php \Drupal\lingotek\Lingotek::deleteDocument()
Deletes the document with this document id from the Lingotek service.
Parameters
string $doc_id: The document id in Lingotek.
Return value
bool TRUE if the document was successfully deleted. FALSE if not.
Overrides LingotekInterface::deleteDocument
Deprecated
in 8.x-2.14, will be removed in 8.x-2.16. Use ::cancelDocument instead.
File
- src/
Lingotek.php, line 384
Class
- Lingotek
- The connecting class between Drupal and Lingotek
Namespace
Drupal\lingotekCode
public function deleteDocument($doc_id) {
$response = $this->api
->deleteDocument($doc_id);
$status_code = $response
->getStatusCode();
if ($status_code == Response::HTTP_NO_CONTENT || $status_code == Response::HTTP_ACCEPTED) {
return TRUE;
}
return FALSE;
}