public function LingotekInterfaceTranslationService::deleteAllMetadata in Lingotek Translation 3.2.x
Same name and namespace in other branches
- 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::deleteAllMetadata()
- 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::deleteAllMetadata()
- 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::deleteAllMetadata()
- 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::deleteAllMetadata()
- 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::deleteAllMetadata()
- 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::deleteAllMetadata()
- 3.8.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::deleteAllMetadata()
Overrides LingotekInterfaceTranslationServiceInterface::deleteAllMetadata
File
- src/
LingotekInterfaceTranslationService.php, line 840
Class
- LingotekInterfaceTranslationService
- Service for managing Lingotek interface translations.
Namespace
Drupal\lingotekCode
public function deleteAllMetadata() {
$state = \Drupal::state();
$translations_metadata = $state
->get('lingotek.interface_translations_metadata');
if ($translations_metadata) {
foreach ($translations_metadata as $component => $componentMetadata) {
if ($componentMetadata['document_id']) {
$this
->cancelDocument($component);
}
}
}
$state
->delete('lingotek.interface_translations_metadata');
}