You are here

function CourseEnrollment::defaultLabel in Course 7

Same name and namespace in other branches
  1. 7.2 includes/CourseEnrollment.inc \CourseEnrollment::defaultLabel()

Enrollment entity label callback.

Overrides Entity::defaultLabel

File

includes/CourseEnrollment.inc, line 8

Class

CourseEnrollment

Code

function defaultLabel() {
  $node = node_load($this->nid);
  $account = user_load($this->uid);
  return t("@username's enrollment in @title", array(
    '@username' => format_username($account),
    '@title' => $node->title,
  ));
}