You are here

public function ConfigSource::getLabel in Translation Management Tool 8

Return a title for this job item.

Parameters

\Drupal\tmgmt\JobItemInterface $job_item: 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;
}