You are here

class views_handler_field_tweetbutton_taxonomy in Tweet Button 6

Hierarchy

Expanded class hierarchy of views_handler_field_tweetbutton_taxonomy

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

File

./tweetbutton_views_field_handlers.inc, line 121

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

}

Members