You are here

class views_handler_field_tweetbutton_node in Tweet Button 6

Hierarchy

Expanded class hierarchy of views_handler_field_tweetbutton_node

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

File

./tweetbutton_views_field_handlers.inc, line 72

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

}

Members