protected function ViewsData::processEntityTypes in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::processEntityTypes()
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.
1 call to ViewsData::processEntityTypes()
- ViewsData::getData in core/
modules/ views/ src/ ViewsData.php - Gets all data invoked by hook_views_data().
File
- core/
modules/ views/ src/ ViewsData.php, line 263 - Contains \Drupal\views\ViewsData.
Class
- ViewsData
- Class to manage and lazy load cached views data.
Namespace
Drupal\viewsCode
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'];
}
}
}
}