dx.new » drupal » form » build

form.inc::_drupal_build_form($form_id, &$form_state) api

  • $form_state, $args, $SESSION,
  • cache: $form = form_get_cache(…)
  • !isset($form)
    • $form = call_user_func_array('drupal_retrieve_form', $args_temp); api
      • etwa $form_id='views_ui_add_form'
      • if (!function_exists($form_id))
        • (if !forms) $forms = module_invoke_all('forms', $form_id, $args);
        • evtl.: $callback = $form_definition['callback'];
      • $form = call_user_func_array(isset($callback) ? $callback : $form_id, $args);
        • etwa: views_ui_add_form(&$form_state) api
          • (siehe unten)
      • return $form;
    • drupal_prepare_form($form_id, $form, $form_state); api
      • ..
  • drupal_process_form_new($form_id, $form, $form_state);
  • return drupal_render_form($form_id, $form); api

views/include/admin.inc::views_ui_add_form(&$form_state) api

  • .
  • foreach (views_fetch_base_tables() as $table ⇒ $info) api
    • $base_tables[$table] = $info['title'] . '<div class=„description“>' . $info['description'] . '</div>';
  • .

views/include/admin.inc::views_fetch_base_tables() api

  • if (empty($base_tables))
    • $data = views_fetch_data(); api
      • views_include('cache');
      • return _views_fetch_data($table);
    • foreach ($data as $table ⇒ $info)
      • $tables[$table] = array('title' ⇒ $info['table']['base']['title'], …);
      • $base_tables = $tables;
  • return $base_tables;

views/include/cache.inc::_views_fetch_data($table = NULL) api

  • views_include_handlers();
  • entweder vom cache
    • $data = views_cache_get('views_data', TRUE);
    • $cache = $data→data;
  • oder
    • $cache = module_invoke_all('views_data');
    • foreach (module_implements('views_data_alter') as $module) …
    • views_cache_set('views_data', $cache, TRUE);
  • return $cache; oder return $cache[$table]; oder return array();
drupal/form/build.txt · Zuletzt geändert: 2022/06/06 15:13 von 127.0.0.1
Recent changes RSS feed Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki