Return a title for this job item.
string|false: The label of the job item entity.
Overrides SourcePluginBase::getLabel
public function getLabel(JobItemInterface $job_item) {
// Use the source language to a get label for the job item.
$langcode = $job_item
->getJob() ? $job_item
->getJob()
->getSourceLangcode() : NULL;
$label = FALSE;
if ($entity = static::load($job_item
->getItemType(), $job_item
->getItemId(), $langcode)) {
$label = $entity
->label() ?: $entity
->id();
}
return is_bool($label) ? $label : (string) $label;
}