Returns the views data definition.
public static function viewsData() {
// Declaration of the base table.
$data['views_test_data']['table'] = array(
'group' => t('Views test'),
'base' => array(
'field' => 'id',
'title' => t('Views test data'),
'help' => t('Users who have created accounts on your site.'),
),
);
// Declaration of fields.
$data['views_test_data']['id'] = array(
'title' => t('ID'),
'help' => t('The test data ID'),
'field' => array(
'id' => 'numeric',
),
'argument' => array(
'id' => 'numeric',
),
'filter' => array(
'id' => 'numeric',
),
'sort' => array(
'id' => 'standard',
),
);
$data['views_test_data']['name'] = array(
'title' => t('Name'),
'help' => t('The name of the person'),
'field' => array(
'id' => 'standard',
),
'argument' => array(
'id' => 'string',
),
'filter' => array(
'id' => 'string',
),
'sort' => array(
'id' => 'standard',
),
);
$data['views_test_data']['age'] = array(
'title' => t('Age'),
'help' => t('The age of the person'),
'field' => array(
'id' => 'numeric',
),
'argument' => array(
'id' => 'numeric',
),
'filter' => array(
'id' => 'numeric',
),
'sort' => array(
'id' => 'standard',
),
);
$data['views_test_data']['job'] = array(
'title' => t('Job'),
'help' => t('The job of the person'),
'field' => array(
'id' => 'standard',
),
'argument' => array(
'id' => 'string',
),
'filter' => array(
'id' => 'string',
),
'sort' => array(
'id' => 'standard',
),
);
$data['views_test_data']['created'] = array(
'title' => t('Created'),
'help' => t('The creation date of this record'),
'field' => array(
'id' => 'date',
),
'argument' => array(
'id' => 'date',
),
'filter' => array(
'id' => 'date',
),
'sort' => array(
'id' => 'date',
),
);
return $data;
}