function views_ui_get_wizard
Fetch metadata on a specific views ui wizard plugin.
Parameters
string $wizard_type: Name of a wizard, or name of a base table.
Return value
array An array with information about the requested wizard type.
1 call to views_ui_get_wizard()
- views_ui_wizard_form_validate in includes/
admin.inc - Validate the add view form.
File
-
./
views_ui.module, line 610
Code
function views_ui_get_wizard($wizard_type) {
ctools_include('plugins');
$wizard = ctools_get_plugins('views_ui', 'views_wizard', $wizard_type);
// @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'];
}
else {
vpr('Views Wizard: @wizard does not exist. Be sure to implement hook_ctools_plugin_directory.', array(
'@wizard' => $wizard_type,
));
}
}
return $wizard;
}