public function JobItem::label

File

src/Entity/JobItem.php, line 283

Class

JobItem
Entity class for the tmgmt_job_item entity.

Namespace

Drupal\tmgmt\Entity

Code

public function label($langcode = NULL) {
  $label = $this
    ->getSourceLabel() ?: parent::label();
  if ($label && strlen($label) > Job::LABEL_MAX_LENGTH) {
    $label = Unicode::truncate($label, Job::LABEL_MAX_LENGTH, TRUE);
  }
  return $label;
}