1 views_ui.module views_ui_get_wizard($wizard_type)

Fetch metadata on a specific views ui wizard plugin.


$wizard_type: Name of a wizard, or name of a base table.

Return value

An array with information about the requested wizard type.:


core/modules/views_ui/views_ui.module, line 526
Provide structure for the administrative interface to Views.


function views_ui_get_wizard($wizard_type) {
  $wizards = views_ui_get_wizards();
  $wizard = isset($wizards[$wizard_type]) ? $wizards[$wizard_type] : NULL;
  // @todo - handle this via an alter hook instead.
  if (!$wizard) {
    // Must be a base table using the default wizard plugin.
    $base_tables = views_fetch_base_tables();
    if (!empty($base_tables[$wizard_type])) {
      $wizard = views_ui_views_wizard_defaults();
      $wizard['base_table'] = $wizard_type;
      $wizard['title'] = $base_tables[$wizard_type]['title'];
    // The plugin is neither a base table nor an existing wizard.
    else {
      watchdog('Views Wizard: @wizard does not exist.', array('@wizard' => $wizard_type));
  return $wizard;