function multiple_email_views_data_alter in Multiple E-mail Addresses 6
Same name and namespace in other branches
- 7 views/multiple_email.views.inc \multiple_email_views_data_alter()
- 2.x views/multiple_email.views.inc \multiple_email_views_data_alter()
File
- views/
multiple_email.views.inc, line 19 - multiple_email views integration file
Code
function multiple_email_views_data_alter(&$views_data) {
foreach ($views_data as $table_key => $table) {
foreach ($table as $key => $data) {
if ($key != 'table' && $key != 'delta' && isset($data['field']['content_field_name'])) {
if ($field = content_fields($data['field']['content_field_name'])) {
if ($field['type'] == 'email') {
$views_data[$table_key][$data['field']['content_field_name'] . '_match'] = array(
'title' => $data['title short'] . ' (' . $field['field_name'] . ') - ' . t('match'),
'help' => t("Match current user's multiple e-mail addresses to CCK E-mail field."),
'group' => t('Content'),
'filter' => $data['filter'],
);
$views_data[$table_key][$field['field_name'] . '_match']['filter']['handler'] = 'multiple_email_handler_filter_current';
//$views_data[$table_key][$field['field_name'] .'_match']['filter']['handler'] = 'content_handler_filter_many_to_one';
}
}
}
}
}
}