You are here

function realname_views_data in Real Name 6

Same name and namespace in other branches
  1. 8 realname.views.inc \realname_views_data()
  2. 7 realname.views.inc \realname_views_data()
  3. 2.x realname.views.inc \realname_views_data()

File

./realname.views.inc, line 16
Realname VIEW declarations.

Code

function realname_views_data() {
  $tables['realname'] = array(
    'table' => array(
      'group' => t('Realname'),
      'join' => array(
        'users' => array(
          'field' => 'uid',
          'left_field' => 'uid',
        ),
      ),
    ),
    'uid' => array(
      'title' => t('Uid'),
      'help' => t('The user ID'),
      // The help that appears on the UI,
      'argument' => array(
        'handler' => 'realname_handler_argument_user_uid',
      ),
      'filter' => array(
        'title' => t('User Realname'),
        'handler' => 'realname_handler_filter_user_name',
      ),
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
    ),
    'realname' => array(
      'title' => t('Name'),
      // The item as it appears on the UI,
      'help' => t('The user or author name.'),
      // The help that appears on the UI,
      'field' => array(
        'handler' => 'realname_handler_field_user_name',
        'click sortable' => TRUE,
      ),
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
      'argument' => array(
        'handler' => 'views_handler_argument_string',
      ),
      'filter' => array(
        'handler' => 'views_handler_filter_string',
      ),
    ),
  );
  return $tables;
}