You are here

function JobForm::checkoutInfo in Translation Management Tool 8

Helper function for retrieving the rendered job checkout information.

1 call to JobForm::checkoutInfo()
JobForm::form in src/Form/JobForm.php
Gets the actual form array to be built.

File

src/Form/JobForm.php, line 725

Class

JobForm
Form controller for the job edit forms.

Namespace

Drupal\tmgmt\Form

Code

function checkoutInfo(JobInterface $job) {

  // The translator might have been disabled or removed.
  if (!$job
    ->hasTranslator()) {
    return array(
      '#markup' => t('The job has no provider assigned.'),
    );
  }
  $translator = $job
    ->getTranslator();
  $plugin_ui = $this->translatorManager
    ->createUIInstance($translator
    ->getPluginId());
  return $plugin_ui
    ->checkoutInfo($job);
}