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

Provide link to node option

Overrides views_handler_field_user::options_form

File

core/modules/user/views/views_handler_field_user_name.inc, line 34
Definition of views_handler_field_user_name.

Class

views_handler_field_user_name
Field handler to provide simple renderer that allows using a themed user link.

Code

function options_form(&$form, &$form_state) {
  $form['format_username'] = array(
    '#title' => t('Use formatted username'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['format_username']),
    '#description' => t('If checked, the username will be formatted by the system. If unchecked, it will be displayed raw.'),
    '#fieldset' => 'more',
  );
  $form['overwrite_anonymous'] = array(
    '#title' => t('Overwrite the value to display for anonymous users'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['overwrite_anonymous']),
    '#description' => t('Enable to display different text for anonymous users.'),
    '#fieldset' => 'more',
  );
  $form['anonymous_text'] = array(
    '#title' => t('Text to display for anonymous users'),
    '#type' => 'textfield',
    '#default_value' => $this->options['anonymous_text'],
    '#states' => array(
      'visible' => array(
        ':input[name="options[overwrite_anonymous]"]' => array('checked' => TRUE),
      ),
    ),
    '#fieldset' => 'more',
  );

  parent::options_form($form, $form_state);
}