public function UcAddressesViewsTestCase::createAddressRowStyleView in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 tests/uc_addresses.views.test \UcAddressesViewsTestCase::createAddressRowStyleView()
Creates a View for address row style View.
1 call to UcAddressesViewsTestCase::createAddressRowStyleView()
- UcAddressesViewsTestCase::testAddressRowStyle in tests/
uc_addresses.views.test - Tests if the row plugin works as expected.
File
- tests/
uc_addresses.views.test, line 901 - Test cases for Views integration.
Class
- UcAddressesViewsTestCase
- Test cases for Views integration.
Code
public function createAddressRowStyleView() {
$view = new view();
$view->name = 'uc_addresses_address_row_style';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'uc_addresses';
$view->human_name = 'uc_addresses_address_row_style';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE;
/* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view
->new_display('default', 'Master', 'default');
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'uc_addresses';
$handler->display->display_options['row_options']['view_link'] = 1;
$handler->display->display_options['row_options']['edit_link'] = 1;
$handler->display->display_options['row_options']['delete_link'] = 1;
$handler->display->display_options['row_options']['default_flags'] = 1;
/* Field: Ubercart Addresses: Address ID */
$handler->display->display_options['fields']['aid']['id'] = 'aid';
$handler->display->display_options['fields']['aid']['table'] = 'uc_addresses';
$handler->display->display_options['fields']['aid']['field'] = 'aid';
/* Contextual filter: Ubercart Addresses: Address ID */
$handler->display->display_options['arguments']['aid']['id'] = 'aid';
$handler->display->display_options['arguments']['aid']['table'] = 'uc_addresses';
$handler->display->display_options['arguments']['aid']['field'] = 'aid';
$handler->display->display_options['arguments']['aid']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['aid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['aid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['aid']['summary_options']['items_per_page'] = '25';
/* Display: Page */
$handler = $view
->new_display('page', 'Page', 'page');
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
$handler->display->display_options['path'] = 'uc_addresses/address-row-style/%';
// Save View.
$view
->save();
return $view;
}