function _views_data_process_entity_types

Links tables having an 'entity type' specified to the respective generic entity-type tables.

1 call to _views_data_process_entity_types()
_views_fetch_data_build in drupal/core/modules/views/includes/cache.inc
Build, set the views data cache if empty and return the views data.

File

drupal/core/modules/views/includes/cache.inc, line 94
Load Views' data so that it knows what is available to build queries from.

Code

function _views_data_process_entity_types(&$data) {
  foreach ($data as $table_name => $table_info) {

    // Add in a join from the entity-table if an entity-type is given.
    if (!empty($table_info['table']['entity type'])) {
      $entity_table = 'views_entity_' . $table_info['table']['entity type'];
      $data[$entity_table]['table']['join'][$table_name] = array(
        'left_table' => $table_name,
      );
      $data[$entity_table]['table']['entity type'] = $table_info['table']['entity type'];

      // Copy over the default table group if we have none yet.
      if (!empty($table_info['table']['group']) && empty($data[$entity_table]['table']['group'])) {
        $data[$entity_table]['table']['group'] = $table_info['table']['group'];
      }
    }
  }
}