function views_fetch_base_tables

Fetch a list of all base tables available

Return value

array A keyed array of in the form of 'base_table' => 'Description'.

2 calls to views_fetch_base_tables()
DefaultWizardDeriver::getDerivativeDefinitions in drupal/core/modules/views/lib/Drupal/views/Plugin/Type/DefaultWizardDeriver.php
Implements Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinitions().
views_ui_edit_page_title in drupal/core/modules/views/views_ui/views_ui.module
Page title callback for the Edit View page.

File

drupal/core/modules/views/views.module, line 1233
Primarily Drupal hooks and global API functions to manipulate views.

Code

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;
}