function CourseEnrollment::defaultLabel in Course 7
Same name and namespace in other branches
- 7.2 includes/CourseEnrollment.inc \CourseEnrollment::defaultLabel()
Enrollment entity label callback.
Overrides Entity::defaultLabel
File
- includes/
CourseEnrollment.inc, line 8
Class
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,
));
}