protected function Registration::defaultLabel in Entity Registration 8.2
Same name in this branch
- 8.2 lib/registration.entity.inc \Registration::defaultLabel()
- 8.2 src/Registration.php \Drupal\registration\Registration::defaultLabel()
Specifies the default label, which is picked up by label() by default.
File
- src/
Registration.php, line 25
Class
- Registration
- Main class for Registration entities.
Namespace
Drupal\registrationCode
protected function defaultLabel() {
$wrapper = entity_metadata_wrapper('registration', $this);
$host = $wrapper->entity
->value();
if ($host) {
return t('Registration for !title', array(
'!title' => $host
->label(),
));
}
return '';
}