You are here

public function LingotekFake::deleteDocument in Lingotek Translation 8

Same name and namespace in other branches
  1. 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

LingotekFake

Namespace

Drupal\lingotek_test

Code

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;
}