You are here

public function LingotekConfigTranslationService::deleteConfigMetadata in Lingotek Translation 8

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

Deletes metadata.

Parameters

string $mapper_id: The entity being uploaded.

Overrides LingotekConfigTranslationServiceInterface::deleteConfigMetadata

File

src/LingotekConfigTranslationService.php, line 950
Contains \Drupal\lingotek\LingotekConfigTranslationService.

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

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