function views_ui_get_wizards

3.x views_ui.module views_ui_get_wizards()

Fetch metadata for all content_type plugins.

Return value

An array of arrays with information about all available views wizards.

1 call to views_ui_get_wizards()
views_ui_add_form in includes/admin.inc
Form builder for the "add new view" page.

File

./views_ui.module, line 582
Provide structure for the administrative interface to Views.

Code

function views_ui_get_wizards() {
  ctools_include('plugins');
  $wizard_plugins = ctools_get_plugins('views_ui', 'views_wizard');
  $wizard_tables = array();
  foreach ($wizard_plugins as $name => $info) {
    $wizard_tables[$info['base_table']] = TRUE;
  }
  $base_tables = views_fetch_base_tables();
  $default_wizard = views_ui_views_wizard_defaults();
  // Find base tables with no wizard.
  // @todo - handle this via an alter hook for plugins?
  foreach ($base_tables as $table => $info) {
    if (!isset($wizard_tables[$table])) {
      $wizard = $default_wizard;
      $wizard['title'] = $info['title'];
      $wizard['base_table'] = $table;
      $wizard_plugins[$table] = $wizard;
    }
  }
  return $wizard_plugins;
}