public function LingotekConfigTranslationService::deleteMetadata in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 3.2.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 3.4.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
- 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::deleteMetadata()
Deletes metadata.
Parameters
\Drupal\Core\Config\Entity\ConfigEntityInterface $entity: The entity which we want to delete.
Return value
ContentEntityInterface The entity.
Overrides LingotekConfigTranslationServiceInterface::deleteMetadata
File
- src/
LingotekConfigTranslationService.php, line 574 - Contains \Drupal\lingotek\LingotekConfigTranslationService.
Class
- LingotekConfigTranslationService
- Service for managing Lingotek configuration translations.
Namespace
Drupal\lingotekCode
public function deleteMetadata(ConfigEntityInterface &$entity) {
if ($this->lingotekConfiguration
->mustDeleteRemoteAfterDisassociation()) {
$this
->deleteDocument($entity);
}
$metadata = LingotekConfigMetadata::loadByConfigName($entity
->getEntityTypeId() . '.' . $entity
->id());
if (!$metadata
->isNew()) {
$metadata
->delete();
}
}