public function GlobalLinkTranslatorUi::checkoutInfo in GlobalLink Connect for Drupal 8
Same name and namespace in other branches
- 8.2 src/GlobalLinkTranslatorUi.php \Drupal\globallink\GlobalLinkTranslatorUi::checkoutInfo()
Retrieves information about a translation job.
Services based translators with remote states should place a Poll button here to sync the job state.
Parameters
\Drupal\tmgmt\JobInterface $job: The translation job.
Overrides TranslatorPluginUiBase::checkoutInfo
File
- src/
GlobalLinkTranslatorUi.php, line 395 - Contains Drupal\globallink\GlobalLinkTranslatorUi.
Class
- GlobalLinkTranslatorUi
- GlobalLink translator UI.
Namespace
Drupal\globallinkCode
public function checkoutInfo(JobInterface $job) {
$form = [];
if ($job
->isActive()) {
$form['actions']['pull'] = [
'#type' => 'submit',
'#value' => t('Pull translations'),
'#submit' => [
[
$this,
'submitPullTranslations',
],
],
'#weight' => -10,
];
}
return $form;
}