function views_handler_field_comment_username::render_link in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 modules/comment/views_handler_field_comment_username.inc \views_handler_field_comment_username::render_link()
- 7.3 modules/comment/views_handler_field_comment_username.inc \views_handler_field_comment_username::render_link()
1 call to views_handler_field_comment_username::render_link()
- views_handler_field_comment_username::render in modules/
comment/ views_handler_field_comment_username.inc - Render the field.
File
- modules/
comment/ views_handler_field_comment_username.inc, line 30
Class
- views_handler_field_comment_username
- Field handler to allow linking to a user account or homepage
Code
function render_link($data, $values) {
if (!empty($this->options['link_to_user'])) {
$account = new stdClass();
$account->uid = $values->{$this->aliases['uid']};
$account->name = $values->{$this->field_alias};
$account->homepage = $values->{$this->aliases['homepage']};
return theme('username', $account);
}
else {
return $data;
}
}