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 includes/cache.inc
Build and set the views data cache if empty.

File

includes/cache.inc, line 108

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