Returns the Uri for this job item.
\Drupal\tmgmt\JobItemInterface $job_item: The job item entity.
\Drupal\Core\Url|null The URL object for the source object.
Overrides SourcePluginBase::getUrl
public function getUrl(JobItemInterface $job_item) {
// Provide logic which allows to test for source which is either accessible
// or not accessible to anonymous user. This is may then be used to test if
// the source url is attached to the job comment sent to a translation
// service.
if ($job_item
->getItemType() == 'test_not_accessible') {
return Url::fromRoute('system.admin');
}
else {
return Url::fromRoute('<front>');
}
}