The _title_callback for the page that renders a single node in preview.
\Drupal\tmgmt\JobItemInterface $tmgmt_job_item: The current node.
string The page title.
public function title(JobItemInterface $tmgmt_job_item) {
$target_language = $tmgmt_job_item
->getJob()
->getTargetLanguage()
->getName();
$entity = ContentEntitySource::load($tmgmt_job_item
->getItemType(), $tmgmt_job_item
->getItemId(), $tmgmt_job_item
->getJob()
->getSourceLangcode());
$title = $entity
->label();
return t("Preview of @title for @target_language", [
'@title' => $title,
'@target_language' => $target_language,
]);
}