public function GlobalLinkTranslatorUi::submitPullTranslations in GlobalLink Connect for Drupal 8
Same name and namespace in other branches
- 8.2 src/GlobalLinkTranslatorUi.php \Drupal\globallink\GlobalLinkTranslatorUi::submitPullTranslations()
Submit callback to pull translations form GlobalLink.
File
- src/
GlobalLinkTranslatorUi.php, line 413 - Contains Drupal\globallink\GlobalLinkTranslatorUi.
Class
- GlobalLinkTranslatorUi
- GlobalLink translator UI.
Namespace
Drupal\globallinkCode
public function submitPullTranslations(array $form, FormStateInterface $form_state) {
/** @var \Drupal\tmgmt\Entity\Job $job */
$job = $form_state
->getFormObject()
->getEntity();
/** @var \Drupal\globallink\Plugin\tmgmt\Translator\GlobalLinkTranslator $translator_plugin */
$translator_plugin = $job
->getTranslator()
->getPlugin();
$translator_plugin
->fetchJobs($job);
tmgmt_write_request_messages($job);
}