function redhen_contact_views_data_alter in RedHen CRM 8
Implements hook_views_data_alter().
Adds a relationship from the user table to its contact entity.
File
- modules/
redhen_contact/ redhen_contact.module, line 82 - Contains redhen_contact.module..
Code
function redhen_contact_views_data_alter(&$data) {
$data['users_field_data']['redhen_contact']['relationship'] = [
'title' => t('Redhen Contact'),
'label' => t('Redhen Contact'),
'group' => 'User',
'help' => t('Reference to the related Redhen Contact for a User.'),
'id' => 'standard',
'base' => 'redhen_contact',
'base field' => 'uid',
'field' => 'uid',
];
}