public static function SmartlingTranslatorUi::finishBatch in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 src/SmartlingTranslatorUi.php \Drupal\tmgmt_smartling\SmartlingTranslatorUi::finishBatch()
- 8.2 src/SmartlingTranslatorUi.php \Drupal\tmgmt_smartling\SmartlingTranslatorUi::finishBatch()
Finish batch callback.
Switch user back after "Upload context" queue batch processing.
File
- src/
SmartlingTranslatorUi.php, line 450 - Contains \Drupal\tmgmt_smartling\SmartlingTranslatorUi.
Class
- SmartlingTranslatorUi
- Smartling translator UI.
Namespace
Drupal\tmgmt_smartlingCode
public static function finishBatch() {
$user_name_before_switching = \Drupal::getContainer()
->get('user.shared_tempstore')
->get(self::TEMP_STORAGE_NAME)
->get(self::USER_NAME_BEFORE_SWITCHING);
\Drupal::getContainer()
->get('tmgmt_smartling.utils.context.user_auth')
->switchUser($user_name_before_switching);
}