You are here

function views_handler_field_tweetbutton::options_form in Tweet Button 6

File

./tweetbutton_views_field_handlers.inc, line 26

Class

views_handler_field_tweetbutton

Code

function options_form(&$form, &$form_state) {
  $form['label'] = array(
    '#type' => 'textfield',
    '#title' => t('Label'),
    '#default_value' => isset($this->options['label']) ? $this->options['label'] : '',
    '#description' => t('The label for this field that will be displayed to end users if the style requires it.'),
  );
  $form['exclude'] = array(
    '#type' => 'checkbox',
    '#title' => t('Exclude from display'),
    '#default_value' => $this->options['exclude'],
    '#description' => t('Check this box to not display this field, but still load it in the view.  Use this option to not show a grouping field in each record, or when doing advanced theming.'),
  );
  $form['tweetbutton_text'] = array(
    '#type' => 'textfield',
    '#title' => t('Tweet Text'),
    '#default_value' => $this->options['tweetbutton_text'],
    '#description' => t('This is the text that people will include in their Tweet when they share from your website. If left blank page title will be used. NOTE: Twitter will generate short url.'),
  );
  $form['tweetbutton'] = array(
    '#type' => 'fieldset',
    '#title' => t('Available Tokens'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['tweetbutton']['tokens'] = array(
    '#value' => theme('token_help', $this->options['entity_type']),
  );
  $form['tweetbutton_button'] = array(
    '#type' => 'select',
    '#options' => array(
      'vertical' => t('Vertical Count'),
      'horizontal' => t('Horizontal Count'),
      'none' => t('No count'),
    ),
    '#title' => t('Tweetbutton type'),
    '#default_value' => $this->options['tweetbutton_button'],
  );
}