1 redirect_handler_field_redirect_source.inc redirect_handler_field_redirect_source::options_form(&$form, &$form_state)

Default options form that provides the label widget that all fields should have.

Overrides views_handler_field::options_form

File

core/modules/redirect/views/redirect_handler_field_redirect_source.inc, line 22
Redirect field handler for {redirect}.source.

Class

redirect_handler_field_redirect_source

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);

  // This field will never be empty
  $form['empty']['#access'] = FALSE;
  $form['empty_zero']['#access'] = FALSE;
  $form['hide_empty']['#access'] = FALSE;

  $form['alter']['make_link']['#description'] = t('If checked, this field will be made into a link.');
  $form['alter']['absolute']['#access'] = FALSE;
  $form['alter']['path']['#access'] = FALSE;

  $form['text'] = array(
    '#type' => 'textfield',
    '#title' => t('Text to display'),
    '#default_value' => $this->options['text'],
  );
  $form['absolute'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use absolute link (begins with "http://")'),
    '#default_value' => $this->options['absolute'],
    '#description' => t('If you want to use this as in "output this field as link" in "link path", you have to enabled this option.'),
  );
}