You are here

public function LingotekConfigTranslationService::deleteConfigMetadata in Lingotek Translation 3.8.x

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

Deletes metadata.

Parameters

string $mapper_id: The entity being uploaded.

Overrides LingotekConfigTranslationServiceInterface::deleteConfigMetadata

7 calls to LingotekConfigTranslationService::deleteConfigMetadata()
LingotekConfigTranslationService::addConfigTarget in src/LingotekConfigTranslationService.php
Request a translation for a given entity in the given locale.
LingotekConfigTranslationService::cancelConfigDocument in src/LingotekConfigTranslationService.php
Cancels a document from the server.
LingotekConfigTranslationService::checkConfigSourceStatus in src/LingotekConfigTranslationService.php
Checks the source is uploaded correctly.
LingotekConfigTranslationService::downloadConfig in src/LingotekConfigTranslationService.php
Downloads a document to the Lingotek service.
LingotekConfigTranslationService::requestConfigTranslations in src/LingotekConfigTranslationService.php
Request all translations for a given mapper in all locales.

... See full list

File

src/LingotekConfigTranslationService.php, line 1660

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function deleteConfigMetadata($mapper_id) {
  $mapper = $this->mappers[$mapper_id];
  $doc_id = $this
    ->getConfigDocumentId($mapper);
  if ($doc_id) {
    $this
      ->cancelConfigDocument($mapper_id);
  }
  foreach ($mapper
    ->getConfigNames() as $config_name) {
    $metadata = LingotekConfigMetadata::loadByConfigName($config_name);
    if (!$metadata
      ->isNew()) {
      $metadata
        ->delete();
    }
  }
}