Allows to alter job checkout workflow after the default behavior.
\Drupal\tmgmt\JobInterface $job: The Job being submitted.
function hook_tmgmt_job_after_request_translation(JobInterface $job) {
/** @var \Drupal\tmgmt\Data $data_service */
$data_service = \Drupal::service('tmgmt.data');
// Reset the previous done changes to the data for example.
foreach ($job
->getItems() as $job_item) {
$unfiltered_data = $job_item
->getData();
$data_items = $data_service
->filterTranslatable($unfiltered_data);
foreach ($data_items as $data_item) {
$data_item['property'] = 'old value';
}
}
}