You are here

public function LingotekConfigTranslationService::cancelConfigDocument in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()
  2. 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()
  3. 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()
  4. 3.2.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()
  5. 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()
  6. 3.4.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()
  7. 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()
  8. 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()
  9. 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()
  10. 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::cancelConfigDocument()

Cancels a document from the server.

Parameters

string $mapper_id: The entity being cancelled.

Overrides LingotekConfigTranslationServiceInterface::cancelConfigDocument

1 call to LingotekConfigTranslationService::cancelConfigDocument()
LingotekConfigTranslationService::deleteConfigMetadata in src/LingotekConfigTranslationService.php
Deletes metadata.

File

src/LingotekConfigTranslationService.php, line 1428

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function cancelConfigDocument($mapper_id) {
  $mapper = $this->mappers[$mapper_id];
  $result = FALSE;
  $doc_id = $this
    ->getConfigDocumentId($mapper);
  if ($doc_id) {
    $result = $this->lingotek
      ->cancelDocument($doc_id);
    $this
      ->setConfigDocumentId($mapper, NULL);
  }
  $this
    ->setConfigSourceStatus($mapper, Lingotek::STATUS_CANCELLED);
  $this
    ->setConfigTargetStatuses($mapper, Lingotek::STATUS_CANCELLED);
  return $result;
}