You are here

public function Job::getTranslatorLabel in Translation Management Tool 8

Returns the label of the translator for this job.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup|string The label of the translator, "(Missing)" in case the translator has been deleted or "(Undefined)" in case the translator is not set.

Overrides JobInterface::getTranslatorLabel

File

src/Entity/Job.php, line 507

Class

Job
Entity class for the tmgmt_job entity.

Namespace

Drupal\tmgmt\Entity

Code

public function getTranslatorLabel() {
  if ($this
    ->hasTranslator()) {
    return $this
      ->getTranslator()
      ->label();
  }
  if ($this
    ->getTranslatorId() == NULL) {
    return t('(Undefined)');
  }
  return t('(Missing)');
}