public function ConfigSource::getLabel

Return a title for this job item.

Parameters

string|false: The label of the job item entity.

Overrides SourcePluginBase::getLabel

File

sources/tmgmt_config/src/Plugin/tmgmt/Source/ConfigSource.php, line 173

Class

ConfigSource
Content entity source plugin controller.

Namespace

Drupal\tmgmt_config\Plugin\tmgmt\Source

Code

public function getLabel(JobItemInterface $job_item) {
  try {
    return $this
      ->getMapper($job_item)
      ->getTitle();
  } catch (TMGMTException $e) {

    // Don't throw an error here as it would clutter the UI.
  }
  return NULL;
}