You are here

protected function Registration::label in Entity Registration 8

Specifies the default label, which is picked up by label() by default.

Overrides EntityInterface::label

File

src/Registration.php, line 52

Class

Registration
Defines the Registration entity.

Namespace

Drupal\registration

Code

protected function label() {
  $wrapper = entity_metadata_wrapper('registration', $this);
  $host = $wrapper->entity
    ->value();
  if ($host) {
    return t('Registration for !title', array(
      '!title' => $host
        ->label(),
    ));
  }
  return '';
}