function computing_views_data_alter in Drupal Computing 7.2
Implements hook_views_data_alter().
File
- ./
computing.views.inc, line 33
Code
function computing_views_data_alter(&$data) {
// TODO: might use EntityAPI's "options list" for "status" property instead of directly alter views.
// see entity.module > 'views' > entity.views.inc > EntityDefaultViewsController.
if (isset($data['computing_record']['status'])) {
$data['computing_record']['status']['field']['handler'] = 'views_handler_field_computing_status';
$data['computing_record']['status']['filter']['handler'] = 'views_handler_filter_computing_status';
}
if (isset($data['computing_record']['uid'])) {
$data['computing_record']['uid']['field']['handler'] = 'views_handler_field_user';
$data['computing_record']['uid']['filter']['handler'] = 'views_handler_filter_user_name';
$data['computing_record']['uid']['argument']['handler'] = 'views_handler_argument_user_uid';
}
$data['computing_record']['input'] = array(
'title' => 'Input',
'help' => t('Computing record "input" field, in JSON.'),
'field' => array(
'handler' => 'views_handler_field_computing_json',
),
);
$data['computing_record']['output'] = array(
'title' => 'Output',
'help' => t('Computing record "output" field, in JSON.'),
'field' => array(
'handler' => 'views_handler_field_computing_json',
),
);
}