You are here

class views_handler_field_tweetbutton_user in Tweet Button 6

Hierarchy

Expanded class hierarchy of views_handler_field_tweetbutton_user

1 string reference to 'views_handler_field_tweetbutton_user'
tweetbutton_views_data in ./tweetbutton.views.inc

File

./tweetbutton_views_field_handlers.inc, line 97

View source
class views_handler_field_tweetbutton_user extends views_handler_field_tweetbutton {
  function construct() {
    parent::construct();
    $this->additional_fields['uid'] = 'uid';
  }
  function option_definition() {
    $options = parent::option_definition();
    $options['entity_type'] = array(
      'default' => 'user',
    );
    return $options;
  }
  function render($values) {
    $uid = $values->{$this->aliases['uid']};
    $options['type'] = $this->options['tweetbutton_button'];
    $options['text'] = $this->options['tweetbutton_text'];
    $options['entity_type'] = $this->options['entity_type'];
    $options['url'] = url('user/' . $uid, array(
      'absolute' => TRUE,
    ));
    $output = theme('tweetbutton_display', user_load($uid), $options);
    return $output;
  }

}

Members