1 views_handler_field_bulk_form.test | ViewsHandlerFieldBulkFormTest::viewsData() |
Defines bulk form handler for custom entity views_test.
Overrides ViewsSqlTest::viewsData
File
- core/
modules/ views/ tests/ handlers/ views_handler_field_bulk_form.test, line 50 - Definition of ViewsHandlerFieldBulkFormTest.
Class
Code
function viewsData() {
$data = parent::viewsData();
// This is needed for views_handler_field_entity, used by the bulk form.
$data['views_test']['table']['entity type'] = 'views_test';
// Define a bulk form for views_test entities.
$data['views_test']['bulk_form'] = array(
'title' => 'Bulk form',
'field' => array(
'handler' => 'views_handler_field_bulk_form',
'real field' => 'id',
),
);
// Define a relationship field to join node to views_test entities.
$data['node']['views_test'] = array(
'title' => 'views_test entity',
'relationship' => array(
'base' => 'views_test',
'base field' => 'nid',
'real field' => 'nid',
'field' => 'nid',
'handler' => 'views_handler_relationship',
),
);
return $data;
}