You are here

protected function GroupMembership::defaultLabel in Group 7

Defines the entity label if the 'entity_class_label' callback is used.

Overrides Entity::defaultLabel

File

classes/group_membership.inc, line 15
Defines the Entity API class for group memberships.

Class

GroupMembership
Main class for group memberships.

Code

protected function defaultLabel() {
  $message = 'Member %account in %group';
  $replace = array(
    '%account' => format_username(user_load($this->uid)),
    '%group' => group_load($this->gid)
      ->label(),
  );
  return t($message, $replace);
}