You are here

function og_views_data_alter in Organic groups 8

Same name and namespace in other branches
  1. 7.2 includes/views/og.views.inc \og_views_data_alter()
  2. 7 includes/og.views.inc \og_views_data_alter()

Implements hook_views_data_alter().

File

./og.views.inc, line 16

Code

function og_views_data_alter(array &$data) {

  // Add relationship to og_membership from users.
  $data['users']['og_membership']['relationship'] = [
    'real field' => 'uid',
    'base' => 'og_membership',
    'base field' => 'uid',
    'label' => new TranslatableMarkup('OG Membership'),
    'title' => new TranslatableMarkup('OG Membership'),
    'id' => 'standard',
  ];
}