1 views_ui.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'.:

File

core/modules/views_ui/views_ui.admin.inc, line 4842
Admin page callbacks for the Views UI module.

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' => !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;
}