You are here

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

Same name and namespace in other branches
  1. 8.2 src/Entity/Registration.php \Drupal\rng\Entity\Registration::label()
  2. 3.x src/Entity/Registration.php \Drupal\rng\Entity\Registration::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/Registration.php, line 87

Class

Registration
Defines the registration entity class.

Namespace

Drupal\rng\Entity

Code

public function label() {
  return !empty($this->id->value) ? t('Registration @id', array(
    '@id' => $this->id->value,
  )) : t('New registration');
}