You are here

function user_views_plugins in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/user.views.inc \user_views_plugins()
  2. 6.2 modules/user.views.inc \user_views_plugins()

Implements hook_views_plugins().

File

modules/user.views.inc, line 561
Provide views data and handlers for user.module.

Code

function user_views_plugins() {
  return array(
    // This just tells our themes are elsewhere.
    'module' => 'views',
    'row' => array(
      'user' => array(
        'title' => t('User'),
        'help' => t('Display the user with standard user view.'),
        'handler' => 'views_plugin_row_user_view',
        // Only works with 'users' as base.
        'base' => array(
          'users',
        ),
        'uses options' => TRUE,
        'type' => 'normal',
        'help topic' => 'style-users',
      ),
    ),
    'argument default' => array(
      'user' => array(
        'title' => t('User ID from URL'),
        'handler' => 'views_plugin_argument_default_user',
        // Not necessary for most modules.
        'path' => drupal_get_path('module', 'views') . '/modules/user',
      ),
      'current_user' => array(
        'title' => t('User ID from logged in user'),
        'handler' => 'views_plugin_argument_default_current_user',
        // Not necessary for most modules.
        'path' => drupal_get_path('module', 'views') . '/modules/user',
      ),
    ),
    'argument validator' => array(
      'user' => array(
        'title' => t('User'),
        'handler' => 'views_plugin_argument_validate_user',
        // Not necessary for most modules.
        'path' => drupal_get_path('module', 'views') . '/modules/user',
      ),
    ),
  );
}