You are here

function user_email_verification_views_data in User email verification 8

Same name and namespace in other branches
  1. 7 views/user_email_verification.views.inc \user_email_verification_views_data()

Implements hook_views_data().

File

./user_email_verification.views.inc, line 11
User email verification views hooks.

Code

function user_email_verification_views_data() {
  $data = [];
  $data['user_email_verification']['table']['group'] = t('User Email verification');
  $data['user_email_verification']['table']['base'] = [
    'field' => 'uid',
    'title' => t('User Email verification'),
    'help' => t('Details about verification of users Email.'),
  ];
  $data['user_email_verification']['uid'] = [
    'title' => t('UID'),
    'help' => t('ID of the related user.'),
    'field' => [
      'id' => 'standard',
    ],
    'filter' => [
      'id' => 'numeric',
    ],
    'argument' => [
      'id' => 'numeric',
    ],
    'sort' => [
      'id' => 'standard',
    ],
    'relationship' => [
      'title' => t('User'),
      'help' => t('ID of the related user.'),
      'base' => 'users_field_data',
      'base field' => 'uid',
      'id' => 'standard',
    ],
  ];
  $data['user_email_verification']['verified'] = [
    'title' => t('Verified'),
    'help' => t('Is email verified flag.'),
    'field' => [
      'id' => 'boolean',
    ],
    'filter' => [
      'id' => 'user_email_verification_verified',
      'label' => t('Is email verified.'),
    ],
    'argument' => [
      'id' => 'numeric',
    ],
    'sort' => [
      'id' => 'standard',
    ],
  ];
  $data['user_email_verification']['last_reminder'] = [
    'title' => t('Last reminder'),
    'help' => t('Last notification timestamp.'),
    'field' => [
      'id' => 'date',
    ],
    'filter' => [
      'id' => 'date',
    ],
    'argument' => [
      'id' => 'date',
    ],
    'sort' => [
      'id' => 'date',
    ],
  ];
  $data['user_email_verification']['reminders'] = [
    'title' => t('Reminders'),
    'help' => t('Number of reminders sent.'),
    'field' => [
      'id' => 'numeric',
    ],
    'filter' => [
      'id' => 'numeric',
    ],
    'argument' => [
      'id' => 'numeric',
    ],
    'sort' => [
      'id' => 'standard',
    ],
  ];
  return $data;
}