public function LingotekConfigTranslationService::setConfigTargetStatus in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 3.2.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 3.4.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
- 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setConfigTargetStatus()
Sets the translation status of all translations of a given entity.
Parameters
ConfigNamesMapper $mapper: The entity which status we want to change.
string $locale: Lingotek translation language which we want to get.
int $status: Status of the translation. Use Lingotek constants.
Return value
Overrides LingotekConfigTranslationServiceInterface::setConfigTargetStatus
7 calls to LingotekConfigTranslationService::setConfigTargetStatus()
- LingotekConfigTranslationService::addConfigTarget in src/
LingotekConfigTranslationService.php - Request a translation for a given entity in the given locale.
- LingotekConfigTranslationService::checkConfigTargetStatus in src/
LingotekConfigTranslationService.php - Checks the status of the translation in the Lingotek service.
- LingotekConfigTranslationService::checkConfigTargetStatuses in src/
LingotekConfigTranslationService.php - Checks the status of the translations in the Lingotek service.
- LingotekConfigTranslationService::downloadConfig in src/
LingotekConfigTranslationService.php - Downloads a document to the Lingotek service.
- LingotekConfigTranslationService::markConfigTranslationsAsDirty in src/
LingotekConfigTranslationService.php - Marks the translation status as dirty if they exist.
File
- src/
LingotekConfigTranslationService.php, line 710 - Contains \Drupal\lingotek\LingotekConfigTranslationService.
Class
- LingotekConfigTranslationService
- Service for managing Lingotek configuration translations.
Namespace
Drupal\lingotekCode
public function setConfigTargetStatus(ConfigNamesMapper $mapper, $langcode, $status, $save = TRUE) {
foreach ($mapper
->getConfigNames() as $config_name) {
$metadata = LingotekConfigMetadata::loadByConfigName($config_name);
$target_status = $metadata
->getTargetStatus();
$target_status[$langcode] = $status;
$metadata
->setTargetStatus($target_status);
$metadata
->save();
}
}