function oa_teams_entity_build_display in Open Atrium Core 7.2
Convert known entities in to a simple array of title and picture.
1 call to oa_teams_entity_build_display()
- oa_team_members_render in modules/
oa_teams/ plugins/ content_types/ oa_teams_members.inc - Main render function for oa_team_members.
File
- modules/
oa_teams/ plugins/ content_types/ oa_teams_members.inc, line 71
Code
function oa_teams_entity_build_display($entity, $id) {
$type = isset($entity->nid) ? 'node' : 'user';
$title = $type == 'user' ? oa_core_realname($entity) : $entity->title;
$display['title'] = l($title, $type . '/' . $id);
$display['uid'] = $id;
if ($type == 'user') {
$display['picture'] = oa_users_picture($entity);
}
else {
$display['picture'] = '';
}
return $display;
}