You are here

function form_build_id_map in Drupal 6

Maintain a map of immutable form_build_ids to cloned form.

Related topics

2 calls to form_build_id_map()
form_get_cache in includes/form.inc
Fetch a form from cache.
form_set_cache in includes/form.inc
Store a form in the cache.

File

includes/form.inc, line 280

Code

function form_build_id_map($form_build_id, $new_build_id = NULL) {
  static $build_id_map = array();
  if (isset($new_build_id) && isset($form_build_id)) {
    $build_id_map[$form_build_id] = $new_build_id;
  }
  return isset($build_id_map[$form_build_id]) ? $build_id_map[$form_build_id] : $form_build_id;
}