Fetch a list of all base tables available
array A keyed array of in the form of 'base_table' => 'Description'.
function views_fetch_base_tables() {
static $base_tables = array();
if (empty($base_tables)) {
$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' => !empty($info['table']['base']['help']) ? $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;
}