function views_ui_get_wizards in Views (for Drupal 7) 8.3
Same name and namespace in other branches
- 7.3 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()
- ViewUI::buildAddForm in views_ui/
lib/ Drupal/ views_ui/ ViewUI.php
File
- views_ui/
views_ui.module, line 491 - Provide structure for the administrative interface to Views.
Code
function views_ui_get_wizards() {
$wizard_plugins = views_get_plugin_definitions('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;
}