function clients_views_views_data in Web Service Clients 7
Same name and namespace in other branches
- 6 clients/clients_views/clients_views.module \clients_views_views_data()
File
- clients/clients_views/clients_views.module, line 83
- Client for Views
Code
function clients_views_views_data() {
foreach (clients_resources_load() as $rid => $source) {
$data[$source['name']]['table']['group'] = $source['name'];
$data[$source['name']]['table']['group'] = t('Clients');
$data[$source['name']]['table']['base'] = array(
'title' => $source['name'],
'help' => t('Clients remote content'),
'query class' => 'clientsQuery',
);
$resource = clients_resource_load($rid);
foreach (clients_fields($resource) as $field_key => $field_val) {
$data[$source['name']][$field_key] = array(
'title' => $field_val['name'],
'help' => $field_val['description'] ? $field_val['description'] : ' ',
'field' => array(
'handler' => 'clients_views_handler_field',
),
);
}
$connection = clients_connection_load((int) $source['connection']);
foreach (clients_arguments($connection) as $arg) {
$data[$source['name']][$arg->name] = array(
'title' => $arg->title,
'help' => $arg->help,
'argument' => array(
'handler' => 'views_handler_argument',
),
);
}
}
return $data;
}