/** * {@inheritdoc} */ public function checkoutInfo(JobInterface $job) { // If the job is finished, it's not possible to import translations anymore. if ($job->isFinished()) { return parent::checkoutInfo($job); } $form = array('#type' => 'fieldset', '#title' => t('Import translated file')); $supported_formats = array_keys(\Drupal::service('plugin.manager.tmgmt_file.format')->getDefinitions()); $form['file'] = array('#type' => 'file', '#title' => t('File'), '#size' => 50, '#description' => t('Supported formats: @formats.', array('@formats' => implode(', ', $supported_formats)))); $form['submit'] = array('#type' => 'submit', '#value' => t('Import'), '#submit' => array('tmgmt_file_import_form_submit')); return $this->checkoutInfoWrapper($job, $form); }