function tweetbutton_handler_field_tweet::render in Tweet Button 7
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field_node::render
File
- ./
tweetbutton_handler_field_tweet.inc, line 53
Class
- tweetbutton_handler_field_tweet
- Field handler to present the path to the node.
Code
function render($values) {
$nid = $values->nid;
$node = node_load($nid);
$url = url("node/{$nid}", array(
'absolute' => TRUE,
));
$tweet_button = theme_tweetbutton_display(array(
'object' => $node,
'options' => array(
'url' => $url,
'type' => $this->options['layout'],
'text' => $this->options['text'],
),
));
return $tweet_button;
}