function wsfields_views_views_data in Web Service Data 7
Implements hook_views_data().
File
- modules/
wsfields_views/ wsfields_views.views.inc, line 10 - wsfields_views.views.inc
Code
function wsfields_views_views_data() {
$data = array();
foreach (field_info_fields() as $field) {
if ($field['storage']['type'] != 'wsfields_storage') {
continue;
}
$entity_types = array_keys($field['bundles']);
foreach ($entity_types as $entity_type) {
$data[$entity_type][$field['field_name']]['field'] = array(
'title' => $field['field_name'],
'help' => t('WSFields Remote Field'),
'handler' => 'wsfields_views_handler_field',
);
$data[$entity_type][$field['field_name'] . '_sort']['sort'] = array(
'title' => $field['field_name'],
'help' => t('WSFields Remote Field'),
'handler' => 'wsfields_views_handler_sort',
);
$data[$entity_type][$field['field_name'] . '_filter']['filter'] = array(
'title' => $field['field_name'],
'help' => t('WSFields Remote Field Filter'),
'handler' => 'wsfields_views_handler_filter',
);
}
}
return $data;
}