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()
Same name and namespace in other branches
- 7.2 lib/registration.entity.inc \Registration::defaultLabel()
- 7 lib/registration.entity.inc \Registration::defaultLabel()
Specifies the default label, which is picked up by label() by default.
File
- lib/
registration.entity.inc, line 29 - Entity hooks and callbacks for registrations.
Class
- Registration
- Main class for Registration entities.
Code
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 '';
}