You are here

function role_expire_views_data_alter in Role Expire 2.x

Same name and namespace in other branches
  1. 8 role_expire.views.inc \role_expire_views_data_alter()

Implements hook_views_data_alter().

File

./role_expire.views.inc, line 76
Role Expire Views hooks.

Code

function role_expire_views_data_alter(array &$data) {

  // Extend the users table to add the role expiration data (a simple field to render data).
  $data['users']['role_expire_expiry_data'] = [
    'title' => t('Role expire: Role expiration all data'),
    'group' => t('Role expire'),
    'field' => [
      'title' => t('Role expiration all data'),
      'help' => t('List of roles that will expire together with their date and time of expiration.'),
      // ID of the views plugin that will handle the field.
      'id' => 'role_expire_expiry_data',
    ],
  ];
}