You are here

public function Registrant::label in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Registrant.php \Drupal\rng\Entity\Registrant::label()
  2. 3.x src/Entity/Registrant.php \Drupal\rng\Entity\Registrant::label()

Gets the label of the entity.

Return value

string|null The label of the entity, or NULL if there is no label defined.

Overrides ContentEntityBase::label

File

src/Entity/Registrant.php, line 119

Class

Registrant
Defines the registrant entity class.

Namespace

Drupal\rng\Entity

Code

public function label() {
  return $this
    ->id() ? t('Registrant @id', [
    '@id' => $this
      ->id(),
  ]) : t('New registrant');
}