protected ViewsData::processEntityTypes(array &$data)
Links tables with 'entity type' to respective generic entity-type tables.
Parameters
array $data: The array of data to alter entity data for, passed by reference.
File
- core/modules/views/src/ViewsData.php, line 271
Class
- ViewsData
- Class to manage and lazy load cached views data.
Namespace
Drupal\views
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | protected function processEntityTypes( array & $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' ]; } } } } |
Please login to continue.