Allows to alter job checkout workflow before the default behavior kicks in.
Note: The default behavior will ignore jobs that have already been checked out. Remove jobs from the array to prevent the default behavior for them.
\Drupal\tmgmt\JobInterface[] $remaining_jobs: List of redirects the user is supposed to be redirected to.
\Drupal\tmgmt\JobInterface[] $jobs: Array with the translation jobs to be checked out.
function hook_tmgmt_job_checkout_before_alter(&$remaining_jobs, &$jobs) {
foreach ($jobs as $job) {
// Automatically check out all jobs using the default settings.
$job->translator = 'example';
$job->translator_context = $job
->getTranslator()
->getPlugin()
->defaultCheckoutSettings();
}
}