function shurly_handler_field_short_url::options_form in ShURLy 6
Same name and namespace in other branches
- 7 views/shurly_handler_field_short_url.inc \shurly_handler_field_short_url::options_form()
File
- views/
shurly_handler_field_short_url.inc, line 26 - Shurly Views handler for short URL
Class
- shurly_handler_field_short_url
- Field handler to present a link to the short URL entry.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// this field will never be empty
unset($form['empty']);
unset($form['hide_empty']);
unset($form['hide_empty']);
$form['text'] = array(
'#type' => 'textfield',
'#title' => t('Text to display'),
'#default_value' => $this->options['text'],
);
$form['longshort'] = array(
'#type' => 'radios',
'#options' => array(
0 => t('Output full URL including base path'),
1 => t('Output only the short path'),
),
'#default_value' => $this->options['longshort'],
);
$form['link'] = array(
'#type' => 'checkbox',
'#title' => t('Output as link'),
'#default_value' => $this->options['link'],
'#description' => t('Wrap output with a link to the short URL. Use <em>Output this field as a link</em> above for more complex options.'),
);
}