protected function LingotekConfigTranslationService::clearConfigTargetStatuses in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
- 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
- 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
- 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
- 3.2.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
- 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
- 3.4.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
- 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
- 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
- 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::clearConfigTargetStatuses()
Clear the target statuses.
Parameters
string $mapper_id:
1 call to LingotekConfigTranslationService::clearConfigTargetStatuses()
- LingotekConfigTranslationService::checkConfigTargetStatuses in src/
LingotekConfigTranslationService.php - Checks the status of the translations in the Lingotek service.
File
- src/
LingotekConfigTranslationService.php, line 1447
Class
- LingotekConfigTranslationService
- Service for managing Lingotek configuration translations.
Namespace
Drupal\lingotekCode
protected function clearConfigTargetStatuses($mapper_id) {
$mapper = $this->mappers[$mapper_id];
$profile = $this->lingotekConfiguration
->getConfigProfile($mapper_id);
if ($profile
->id() === Lingotek::PROFILE_DISABLED || $this
->getConfigSourceStatus($mapper) === Lingotek::STATUS_CANCELLED) {
return FALSE;
}
foreach ($mapper
->getConfigNames() as $config_name) {
$metadata = LingotekConfigMetadata::loadByConfigName($config_name);
$metadata
->setTargetStatus([])
->save();
}
}