1 views_ui.admin.inc views_ui_build_form_state($js, $key, &$view, $display_id, $args)

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

File

core/modules/views_ui/views_ui.admin.inc, line 2736
Admin page callbacks for the Views UI module.

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