public function LingotekFake::deleteDocument in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::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
File
- tests/
modules/ lingotek_test/ src/ LingotekFake.php, line 247
Class
Namespace
Drupal\lingotek_testCode
public function deleteDocument($doc_id) {
$deleted_docs = \Drupal::state()
->get('lingotek.deleted_docs', []);
$deleted_docs[] = $doc_id;
\Drupal::state()
->set('lingotek.deleted_docs', $deleted_docs);
return TRUE;
}