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) {
try {
$config_mapper = $this
->getMapper($job_item);
return Url::fromRoute($config_mapper
->getBaseRouteName(), $config_mapper
->getBaseRouteParameters());
} catch (TMGMTException $e) {
$this
->messenger()
->addError(t('Url can not be displayed, the entity does not exist: %error.', array(
'%error' => $e
->getMessage(),
)));
}
return NULL;
}