function pcp_views_data_alter in Profile Complete Percent 7
Implements hook_views_data_alter().
Here we define pseudo-fields for the {profile} table.
File
- includes/
pcp.views.inc, line 13 - Declare Profile Complete Percent fields.
Code
function pcp_views_data_alter(&$data) {
$data['users']['profile_completeness'] = array(
'title' => t('Profile Completeness'),
'help' => t('Profile completeness expressed as a percentage 0..100'),
'field' => array(
'handler' => 'pcp_handler_field_profile_completeness_core',
'click sortable' => FALSE,
),
);
$data['profile']['profile_completeness'] = array(
'title' => t('Profile Completeness'),
'help' => t('Profile2 completeness expressed as a percentage 0..100'),
'field' => array(
'handler' => 'pcp_handler_field_profile_completeness',
'click sortable' => FALSE,
),
);
}