protected function GProfile::defaultLabel in Group 7
Defines the entity label if the 'entity_class_label' callback is used.
Overrides Entity::defaultLabel
File
- modules/
gprofile/ classes/ gprofile.inc, line 15 - Defines the Entity API class for group member profiles.
Class
- GProfile
- Main class for group member profiles.
Code
protected function defaultLabel() {
$group_membership = $this
->getMember();
$message = '%profile profile for %member in %group';
$replace = array(
'%profile' => gprofile_type_load($this->type)
->label(),
'%member' => format_username(user_load($group_membership->uid)),
'%group' => group_load($group_membership->gid)
->label(),
);
return t($message, $replace);
}