You are here

function data_entity_get_entity_tables in Data 7

Get all data tables which are declared as entities.

Return value

An array of table objects, keyed by table name, for the tables that are declared as entity types.

6 calls to data_entity_get_entity_tables()
data_entity_entity_info in data_entity/data_entity.module
Implements hook_entity_info().
data_entity_entity_property_info in data_entity/data_entity.info.inc
Implements hook_entity_property_info().
data_entity_menu_alter in data_entity/data_entity.module
Implements hook_menu_alter().
data_entity_permission in data_entity/data_entity.module
Implements hook_permission().
data_entity_views_data_alter in data_entity/views/data_entity.views.inc
Implements hook_views_data_alter().

... See full list

File

data_entity/data_entity.module, line 14
data_entity.module TODO: Enter file description here.

Code

function data_entity_get_entity_tables($reset = FALSE) {
  $tables = data_get_all_tables($reset);
  $entity_tables = array();
  foreach ($tables as $name => $table) {
    $meta = $table
      ->get('meta');
    if (!empty($meta['is_entity_type'])) {
      $entity_tables[$name] = $table;
    }
  }
  return $entity_tables;
}