You are here

function views_ui_build_form_state in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 includes/admin.inc \views_ui_build_form_state()
  2. 7.3 includes/admin.inc \views_ui_build_form_state()

Build up a $form_state object suitable for use with drupal_build_form based on known information about a form.

1 call to views_ui_build_form_state()
views_ui_ajax_form in includes/admin.inc
Generic entry point to handle forms.
1 string reference to 'views_ui_build_form_state'
views_ui_ajax_form in includes/admin.inc
Generic entry point to handle forms.

File

includes/admin.inc, line 1669
admin.inc Provides the Views' administrative interface.

Code

function views_ui_build_form_state($js, $key, &$view, $display_id, $args) {
  $form = views_ui_ajax_forms($key);

  // Build up form state
  $form_state = array(
    'form_key' => $key,
    'form_id' => $form['form_id'],
    'view' => &$view,
    'ajax' => $js,
    'display_id' => $display_id,
    'no_redirect' => TRUE,
  );
  foreach ($form['args'] as $id) {
    $form_state[$id] = !empty($args) ? array_shift($args) : NULL;
  }
  return $form_state;
}