You are here

function tweetbutton_handler_field_tweet::options_form in Tweet Button 7

Provide link to node option.

Overrides views_handler_field_node::options_form

File

./tweetbutton_handler_field_tweet.inc, line 25

Class

tweetbutton_handler_field_tweet
Field handler to present the path to the node.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['layout'] = array(
    '#type' => 'select',
    '#title' => t('Layout style'),
    '#default_value' => $this->options['layout'],
    '#description' => t('Set the layout for your tweet button'),
    '#options' => array(
      'vertical' => 'Vertical Count',
      'horizontal' => 'Horizontal Count',
      'none' => 'No Count',
    ),
  );
  $form['text'] = array(
    '#type' => 'textfield',
    '#title' => t('Tweet Text'),
    '#default_value' => $this->options['text'],
    '#description' => t('Recommend a text for the tweet.'),
  );
  $form['tokens'] = array(
    '#token_types' => array(
      'node',
    ),
    '#theme' => 'token_tree',
  );

  // Remove irrelevant controls / settings.
  unset($form['empty']);
  unset($form['empty_zero']);
  unset($form['hide_empty']);
  unset($form['link_to_node']);
}