function 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 48
Class
- views_handler_field_comment_username
- Field handler to allow linking to a user account or homepage.
Code
public function render_link($data, $values) {
if (!empty($this->options['link_to_user'])) {
$account = new stdClass();
$account->uid = $this->get_value($values, 'uid');
$account->name = $this->get_value($values);
$account->homepage = $this->get_value($values, 'homepage');
return theme('username', array(
'account' => $account,
));
}
else {
return $data;
}
}