protected function Registration::defaultLabel in Entity Registration 7
Same name and namespace in other branches
- 8.2 lib/registration.entity.inc \Registration::defaultLabel()
- 7.2 lib/registration.entity.inc \Registration::defaultLabel()
Specifies the default label, which is picked up by label() by default.
Overrides Entity::defaultLabel
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' => entity_label($this->entity_type, $host),
));
}
return '';
}