function views_fetch_base_tables
Same name in other branches
- 7.x-3.x includes/admin.inc \views_fetch_base_tables()
Fetch a list of all base tables available
Return value
A keyed array of in the form of 'base_table' => 'Description'.
3 calls to views_fetch_base_tables()
- template_preprocess_views_ui_list_views in includes/
admin.inc - Preprocess the list views theme
- views_ui_add_form in includes/
admin.inc - Form constructor callback to create the views Add Form, phase 1.
- views_ui_list_views_form in includes/
admin.inc - Provide a form for sorting and filtering the list of views.
File
-
includes/
admin.inc, line 3859
Code
function views_fetch_base_tables() {
static $base_tables = array();
if (empty($base_tables)) {
$weights = array();
$tables = array();
$data = views_fetch_data();
foreach ($data as $table => $info) {
if (!empty($info['table']['base'])) {
$tables[$table] = array(
'title' => $info['table']['base']['title'],
'description' => $info['table']['base']['help'],
'weight' => !empty($info['table']['base']['weight']) ? $info['table']['base']['weight'] : 0,
);
}
}
uasort($tables, '_views_weight_sort');
$base_tables = $tables;
}
return $base_tables;
}