protected function ViewTestBase::viewsData in Views (for Drupal 7) 8.3
The views data definition.
22 calls to ViewTestBase::viewsData()
- AreaTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ AreaTest.php - The views data definition.
- ArgumentNullTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ ArgumentNullTest.php - The views data definition.
- FieldBooleanTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ FieldBooleanTest.php - The views data definition.
- FieldCustomTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ FieldCustomTest.php - The views data definition.
- FieldDateTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ FieldDateTest.php - The views data definition.
20 methods override ViewTestBase::viewsData()
- AreaTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ AreaTest.php - The views data definition.
- ArgumentNullTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ ArgumentNullTest.php - The views data definition.
- FieldBooleanTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ FieldBooleanTest.php - The views data definition.
- FieldCustomTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ FieldCustomTest.php - The views data definition.
- FieldDateTest::viewsData in lib/
Drupal/ views/ Tests/ Handler/ FieldDateTest.php - The views data definition.
File
- lib/
Drupal/ views/ Tests/ ViewTestBase.php, line 254 - Definition of Drupal\views\Tests\ViewTestBase.
Class
- ViewTestBase
- Abstract class for views testing.
Namespace
Drupal\views\TestsCode
protected 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',
'click sortable' => TRUE,
),
'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',
'click sortable' => TRUE,
),
'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',
'click sortable' => TRUE,
),
'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',
'click sortable' => TRUE,
),
'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',
'click sortable' => TRUE,
),
'argument' => array(
'id' => 'date',
),
'filter' => array(
'id' => 'date',
),
'sort' => array(
'id' => 'date',
),
);
return $data;
}