1 views_handler_sort.inc views_handler_sort::expose_form(&$form, &$form_state)

Form for exposed handler options.

Overrides views_handler::expose_form

File

core/modules/views/handlers/views_handler_sort.inc, line 190
@todo.

Class

views_handler_sort
Base sort handler that has no options and performs a simple sort.

Code

function expose_form(&$form, &$form_state) {
  // #flatten will move everything from $form['expose'][$key] to $form[$key]
  // prior to rendering. That's why the pre_render for it needs to run first,
  // so that when the next pre_render (the one for fieldsets) runs, it gets
  // the flattened data.
  array_unshift($form['#pre_render'], 'views_ui_pre_render_flatten_data');
  $form['expose']['#flatten'] = TRUE;

  $form['expose']['label'] = array(
    '#type' => 'textfield',
    '#default_value' => $this->options['expose']['label'],
    '#title' => t('Label'),
    '#required' => TRUE,
    '#size' => 40,
    '#weight' => -1,
  );
}