public function FileTranslatorUi::checkoutSettingsForm

Form callback for the checkout settings form.

Overrides TranslatorPluginUiBase::checkoutSettingsForm

File

translators/tmgmt_file/src/FileTranslatorUi.php, line 100

Class

FileTranslatorUi
File translator UI.

Namespace

Drupal\tmgmt_file

Code

public function checkoutSettingsForm(array $form, FormStateInterface $form_state, JobInterface $job) {
  if ($job
    ->getTranslator()
    ->getSetting('allow_override')) {
    $form['export_format'] = array(
      '#type' => 'radios',
      '#title' => t('Export to'),
      '#options' => \Drupal::service('plugin.manager.tmgmt_file.format')
        ->getLabels(),
      '#default_value' => $job
        ->getTranslator()
        ->getSetting('export_format'),
      '#description' => t('Please select the format you want to export data.'),
    );
  }
  return parent::checkoutSettingsForm($form, $form_state, $job);
}