You are here

function me_views_data_alter in me aliases 6

Implementation of views' hook_views_data_alter().

See http://drupal.org/project/views for module and hook information.

File

includes/me.views.inc, line 14
Provides views intergration for the me module.

Code

function me_views_data_alter(&$cache) {

  // Make our handler the one to use for handling user arguments.
  // We need to override the file, path, and parent here so views with one
  // of the user id or username arguments don't break. Because we are doing an
  // override, we actually don't need to implement hook_views_handlers().
  // UID argument.
  $cache['users']['uid']['argument']['handler'] = 'me_views_handler_argument_user_uid';
  $cache['users']['uid']['argument']['file'] = 'me_views_handler_argument_user_uid.inc';
  $cache['users']['uid']['argument']['path'] = drupal_get_path('module', 'me') . '/includes';
  $cache['users']['uid']['argument']['parent'] = 'views_handler_argument_user_uid';

  // Name argument.
  $cache['users']['name']['argument']['handler'] = 'me_views_handler_argument_user_name';
  $cache['users']['name']['argument']['file'] = 'me_views_handler_argument_user_name.inc';
  $cache['users']['name']['argument']['path'] = drupal_get_path('module', 'me') . '/includes';
  $cache['users']['name']['argument']['parent'] = 'views_handler_argument_string';
}