function 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 2970

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;
}