You are here

function data_search_get_tables in Data 6

Same name and namespace in other branches
  1. 8 data_search/data_search.module \data_search_get_tables()
  2. 7 data_search/data_search.module \data_search_get_tables()

Gather all tables which might be eligible for searching.

4 calls to data_search_get_tables()
data_search_cron in data_search/data_search.module
Implementation of hook_cron().
data_search_search in data_search/data_search.module
Implementation of hook_search().
data_search_update_index in data_search/data_search.module
Implementation of hook_update_index().
data_search_views_data_alter in data_search/data_search.module
Implementation of hook_views_data_alter().

File

data_search/data_search.module, line 156

Code

function data_search_get_tables() {
  $tables = array();
  foreach (data_get_all_tables() as $table) {
    $schema = $table
      ->get('table_schema');
    $fields = data_search_get_fields($table);
    if (isset($schema['primary key']) && count($schema['primary key']) >= 1 && !empty($fields)) {
      $tables[] = $table;
    }
  }
  return $tables;
}