Commit f45fd073 authored by damiankloip's avatar damiankloip Committed by tim.plunkett

Issue #1765026 by damiankloip: CamelCase methods in ViewStorage class.

parent 0e972137
......@@ -1286,7 +1286,7 @@ function views_ui_edit_form_submit_add_display($form, &$form_state) {
// Create the new display.
$parents = $form_state['triggering_element']['#parents'];
$display_type = array_pop($parents);
$display_id = $view->add_display($display_type);
$display_id = $view->addDisplay($display_type);
views_ui_cache_set($view);
// Redirect to the new display's edit page.
......@@ -1302,7 +1302,7 @@ function views_ui_edit_form_submit_duplicate_display($form, &$form_state) {
// Create the new display.
$display = $view->display[$display_id];
$new_display_id = $view->add_display($display->display_plugin);
$new_display_id = $view->addDisplay($display->display_plugin);
$view->display[$new_display_id] = clone $display;
$view->display[$new_display_id]->id = $new_display_id;
......@@ -4126,7 +4126,7 @@ function views_ui_add_item_form_submit($form, &$form_state) {
if ($cut = strpos($field, '$')) {
$field = substr($field, 0, $cut);
}
$id = $form_state['view']->add_item($form_state['display_id'], $type, $table, $field);
$id = $form_state['view']->addItem($form_state['display_id'], $type, $table, $field);
// check to see if we have group by settings
$key = $type;
......@@ -4169,7 +4169,7 @@ function views_ui_config_item_form_build_group($form, &$form_state) {
$form_state['handler']->build_group_options();
}
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
$form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
views_ui_add_form_to_stack($form_state['form_key'], $form_state['view'], $form_state['display_id'], array($form_state['type'], $form_state['id']), TRUE, TRUE);
......@@ -4188,7 +4188,7 @@ function views_ui_config_item_form_add_group($form, &$form_state) {
// Add a new row.
$item['group_info']['group_items'][] = array();
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
$form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
views_ui_cache_set($form_state['view']);
$form_state['rerender'] = TRUE;
......@@ -4215,7 +4215,7 @@ function views_ui_config_item_form($form, &$form_state) {
if (!$view->setDisplay($display_id)) {
views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
}
$item = $view->get_item($display_id, $type, $id);
$item = $view->getItem($display_id, $type, $id);
if ($item) {
$handler = $view->display_handler->getHandler($type, $id);
......@@ -4272,7 +4272,7 @@ function views_ui_config_item_form($form, &$form_state) {
$rel = key($relationship_options);
// We want this relationship option to get saved even if the user
// skips submitting the form.
$view->set_item_option($display_id, $type, $id, 'relationship', $rel);
$view->setItemOption($display_id, $type, $id, 'relationship', $rel);
$temp_view = $view->cloneView();
views_ui_cache_set($temp_view);
}
......@@ -4431,7 +4431,7 @@ function views_ui_config_item_form_submit($form, &$form_state) {
$handler->unpack_options($handler->options, $options, NULL, FALSE);
// Store the item back on the view
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $handler->options);
$form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $handler->options);
// Ensure any temporary options are removed.
if (isset($form_state['view']->temporary_options[$type][$form_state['id']])) {
......@@ -4464,7 +4464,7 @@ function views_ui_config_item_group_form($type, &$form_state) {
$view->initQuery();
$item = $view->get_item($display_id, $type, $id);
$item = $view->getItem($display_id, $type, $id);
if ($item) {
$handler = $view->display_handler->getHandler($type, $id);
......@@ -4500,7 +4500,7 @@ function views_ui_config_item_group_form_submit($form, &$form_state) {
$handler->groupby_form_submit($form, $form_state);
// Store the item back on the view
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
$form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
// Write to cache
views_ui_cache_set($form_state['view']);
......@@ -4517,7 +4517,7 @@ function views_ui_config_item_form_remove($form, &$form_state) {
$display =& $form_state['view']->display[$form_state['display_id']];
$display->handler->optionsOverride($form, $form_state);
}
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], NULL);
$form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], NULL);
// Write to cache
views_ui_cache_set($form_state['view']);
......@@ -4536,7 +4536,7 @@ function views_ui_config_item_form_expose($form, &$form_state) {
$form_state['handler']->expose_options();
}
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
$form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
views_ui_add_form_to_stack($form_state['form_key'], $form_state['view'], $form_state['display_id'], array($form_state['type'], $form_state['id']), TRUE, TRUE);
......@@ -4565,7 +4565,7 @@ function views_ui_config_item_extra_form($form, &$form_state) {
if (!$view->setDisplay($display_id)) {
views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
}
$item = $view->get_item($display_id, $type, $id);
$item = $view->getItem($display_id, $type, $id);
if ($item) {
$handler = $view->display_handler->getHandler($type, $id);
......@@ -4611,7 +4611,7 @@ function views_ui_config_item_extra_form_submit($form, &$form_state) {
}
// Store the item back on the view
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
$form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
// Write to cache
views_ui_cache_set($form_state['view']);
......@@ -4636,7 +4636,7 @@ function views_ui_config_style_form($form, &$form_state) {
if (!$view->setDisplay($display_id)) {
views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
}
$item = $view->get_item($display_id, $type, $id);
$item = $view->getItem($display_id, $type, $id);
if ($item) {
$handler = views_get_handler($item['table'], $item['field'], $type);
......@@ -4681,7 +4681,7 @@ function views_ui_config_style_form_submit($form, &$form_state) {
$item['style_options'] = $form_state['values']['style_options'];
// Store the item back on the view
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
$form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
// Write to cache
views_ui_cache_set($form_state['view']);
......@@ -5372,7 +5372,7 @@ function views_ui_field_list() {
foreach ($view->display as $display_id => $display) {
if ($view->setDisplay($display_id)) {
foreach (View::viewsObjectTypes() as $type => $info) {
foreach ($view->get_items($type, $display_id) as $item) {
foreach ($view->getItems($type, $display_id) as $item) {
$data = views_fetch_data($item['table']);
if (isset($data[$item['field']]) && isset($data[$item['field']][$type])
&& $data = $data[$item['field']][$type]) {
......
......@@ -165,7 +165,7 @@ function get_temporary_view() {
$view = new View(array(), 'view');
$view->vid = 'new'; // @todo: what's this?
$view->base_table = $this->definition['base'];
$view->add_display('default');
$view->addDisplay('default');
return $view;
}
......@@ -209,7 +209,7 @@ function left_query($options) {
$sort = $options['subquery_sort'];
list($sort_table, $sort_field) = explode('.', $sort);
$sort_options = array('order' => $options['subquery_order']);
$temp_view->add_item('default', 'sort', $sort_table, $sort_field, $sort_options);
$temp_view->addItem('default', 'sort', $sort_table, $sort_field, $sort_options);
}
// Get the namespace string.
......@@ -223,12 +223,12 @@ function left_query($options) {
// Add the base table ID field.
$views_data = views_fetch_data($this->definition['base']);
$base_field = $views_data['table']['base']['field'];
$temp_view->add_item('default', 'field', $this->definition['base'], $this->definition['field']);
$temp_view->addItem('default', 'field', $this->definition['base'], $this->definition['field']);
// Add the correct argument for our relationship's base
// ie the 'how to get back to base' argument.
// The relationship definition tells us which one to use.
$temp_view->add_item(
$temp_view->addItem(
'default',
'argument',
$this->definition['argument table'], // eg 'term_node',
......
......@@ -560,7 +560,7 @@ protected function instantiate_view($form, &$form_state) {
// be able to get all the overrides correct.
$this->alter_display_options($display_options, $form, $form_state);
$this->add_displays($view, $display_options, $form, $form_state);
$this->addDisplays($view, $display_options, $form, $form_state);
return $view;
}
......@@ -614,16 +614,16 @@ protected function alter_display_options(&$display_options, $form, $form_state)
/**
* Adds the array of display options to the view, with appropriate overrides.
*/
protected function add_displays($view, $display_options, $form, $form_state) {
protected function addDisplays($view, $display_options, $form, $form_state) {
// Display: Master
$default_display = $view->new_display('default', 'Master', 'default');
$default_display = $view->newDisplay('default', 'Master', 'default');
foreach ($display_options['default'] as $option => $value) {
$default_display->setOption($option, $value);
}
// Display: Page
if (isset($display_options['page'])) {
$display = $view->new_display('page', 'Page', 'page');
$display = $view->newDisplay('page', 'Page', 'page');
// The page display is usually the main one (from the user's point of
// view). Its options should therefore become the overall view defaults,
// so that new displays which are added later automatically inherit them.
......@@ -631,14 +631,14 @@ protected function add_displays($view, $display_options, $form, $form_state) {
// Display: Feed (attached to the page).
if (isset($display_options['feed'])) {
$display = $view->new_display('feed', 'Feed', 'feed');
$display = $view->newDisplay('feed', 'Feed', 'feed');
$this->set_override_options($display_options['feed'], $display, $default_display);
}
}
// Display: Block.
if (isset($display_options['block'])) {
$display = $view->new_display('block', 'Block', 'block');
$display = $view->newDisplay('block', 'Block', 'block');
// When there is no page, the block display options should become the
// overall view defaults.
if (!isset($display_options['page'])) {
......
......@@ -55,7 +55,7 @@ function view_comment_user_uid() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
......
......@@ -31,7 +31,7 @@ public static function getInfo() {
function view_comment_user_uid() {
$view = parent::view_comment_user_uid();
// Remove the argument.
$view->set_item('default', 'argument', 'uid_touch', NULL);
$view->setItem('default', 'argument', 'uid_touch', NULL);
$options = array(
'id' => 'uid_touch',
......@@ -39,7 +39,7 @@ function view_comment_user_uid() {
'field' => 'uid_touch',
'value' => array($this->loggedInUser->uid),
);
$view->add_item('default', 'filter', 'node', 'uid_touch', $options);
$view->addItem('default', 'filter', 'node', 'uid_touch', $options);
return $view;
}
......
......@@ -213,7 +213,7 @@ protected function getFieldView() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
......
......@@ -73,7 +73,7 @@ function viewGlossary() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
......
......@@ -166,7 +166,7 @@ function views_test_between() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
......
......@@ -156,7 +156,7 @@ function view_access_none() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......@@ -179,7 +179,7 @@ function view_access_perm() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'views_test test permission';
$handler->display->display_options['cache']['type'] = 'none';
......@@ -203,7 +203,7 @@ function view_access_role() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'role';
$handler->display->display_options['access']['role'] = array(
$this->normal_role => $this->normal_role,
......@@ -229,7 +229,7 @@ function view_access_dynamic() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'test_dynamic';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......@@ -237,7 +237,7 @@ function view_access_dynamic() {
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
$handler = $view->new_display('page', 'Page', 'page_1');
$handler = $view->newDisplay('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'test_access_dynamic';
return $view;
......@@ -255,7 +255,7 @@ function view_access_static() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'test_static';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......@@ -263,7 +263,7 @@ function view_access_static() {
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
$handler = $view->new_display('page', 'Page', 'page_1');
$handler = $view->newDisplay('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'test_access_static';
return $view;
......
......@@ -105,7 +105,7 @@ function view_argument_default_fixed() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......
......@@ -58,7 +58,7 @@ function view_test_argument_validate_php($string) {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......@@ -90,7 +90,7 @@ function view_argument_validate_numeric() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......
......@@ -39,11 +39,11 @@ protected function getBasicView() {
// Create the basic view.
$view = new View(array(), 'view');
$view->name = 'test_view';
$view->add_display('default');
$view->addDisplay('default');
$view->base_table = 'views_test';
// Set up the fields we need.
$display = $view->new_display('default', 'Master', 'default');
$display = $view->newDisplay('default', 'Master', 'default');
$display->overrideOption('fields', array(
'id' => array(
'id' => 'id',
......
......@@ -53,7 +53,7 @@ function viewFilterGroupsOverriding() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
......@@ -77,7 +77,7 @@ function viewFilterGroupsOverriding() {
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler = $view->newDisplay('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'test';
return $view;
......@@ -102,7 +102,7 @@ function viewFilterGroupsUpdating() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['title'] = 'test_filter_groups';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
......@@ -149,7 +149,7 @@ function viewFilterGroupsUpdating() {
$handler->display->display_options['filters']['nid_1']['group'] = 2;
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler = $view->newDisplay('page', 'Page', 'page');
$handler->display->display_options['filter_groups']['operator'] = 'OR';
$handler->display->display_options['filter_groups']['groups'] = array(
1 => 'OR',
......
......@@ -107,7 +107,7 @@ public function viewsStorePagerSettings() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......@@ -166,7 +166,7 @@ public function viewsPagerNoLimit() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......@@ -242,7 +242,7 @@ public function viewsPagerLimit() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......@@ -326,7 +326,7 @@ function viewPagerFullZeroItemsPerPage() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......@@ -366,7 +366,7 @@ function viewsPagerFull() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......@@ -392,7 +392,7 @@ function viewsPagerFullFields() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......
......@@ -76,7 +76,7 @@ public function viewsAggregateCountView() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['group_by'] = TRUE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
......@@ -161,7 +161,7 @@ function viewsGroupByViewHelper($group_by) {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['group_by'] = TRUE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
......@@ -255,7 +255,7 @@ public function viewsGroupByCountViewOnlyFilters() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['group_by'] = TRUE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
......
......@@ -87,7 +87,7 @@ function view_taxonomy_node_term_data() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
......
......@@ -152,7 +152,7 @@ public function view_unpack_translatable() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master1', 'default');
$handler = $view->newDisplay('default', 'Master1', 'default');
$handler->display->display_options['title'] = 'title1';
$handler->display->display_options['use_more_text'] = 'more1';
$handler->display->display_options['access']['type'] = 'none';
......
......@@ -131,7 +131,7 @@ public function viewsMovedToField() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['fields']['old_field_1']['id'] = 'old_field_1';
$handler->display->display_options['fields']['old_field_1']['table'] = 'views_test';
......@@ -152,7 +152,7 @@ public function viewsMovedToHandler() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['fields']['old_field_2']['id'] = 'old_field_2';
$handler->display->display_options['fields']['old_field_2']['table'] = 'views_test';
......@@ -177,7 +177,7 @@ public function viewsMovedToTable() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['fields']['id']['id'] = 'id';
$handler->display->display_options['fields']['id']['table'] = 'views_old_table';
......@@ -199,7 +199,7 @@ protected function viewUpgradeImport() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Defaults */
$handler = $view->new_display("default", "Defaults", "default");
$handler = $view->newDisplay("default", "Defaults", "default");
$handler->display->display_options["title"] = "Recent comments";
$handler->display->display_options["use_more"] = TRUE;
$handler->display->display_options["access"]["type"] = "none";
......@@ -240,7 +240,7 @@ protected function viewUpgradeImport() {
$handler->display->display_options["filters"]["status_extra"]["expose"]["operator"] = FALSE;
/* Display: Page */
$handler = $view->new_display("page", "Page", "page");
$handler = $view->newDisplay("page", "Page", "page");
$handler->display->display_options["defaults"]["items_per_page"] = FALSE;
$handler->display->display_options["defaults"]["style_plugin"] = FALSE;
$handler->display->display_options["style_plugin"] = "html_list";
......@@ -281,7 +281,7 @@ protected function viewUpgradeImport() {
$handler->display->display_options["path"] = "comments/recent";
/* Display: Block */
$handler = $view->new_display("block", "Block", "block");
$handler = $view->newDisplay("block", "Block", "block");
$handler->display->display_options["block_description"] = "Recent comments view"
;';
......
......@@ -57,7 +57,7 @@ function view_plugin_argument_default_current_user() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......
......@@ -98,7 +98,7 @@ function view_argument_validate_user($argtype) {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
......
......@@ -69,7 +69,7 @@ function view_user_name() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
......
......@@ -78,7 +78,7 @@ function test_view_user_relationship() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['title'] = 'test_user_relationship';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
......
......@@ -228,7 +228,7 @@ protected function displayTests() {
// Check whether a display can be added and saved to a View.
$view = $this->loadView('frontpage');
$view->new_display('page', 'Test', 'test');
$view->newDisplay('page', 'Test', 'test');
$new_display = $view->display['test'];
$this->assertTrue($new_display instanceof ViewDisplay, 'New page display "test" created.');
......
......@@ -101,7 +101,7 @@ function view_test_destroy() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler = $view->newDisplay('default', 'Master', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
......@@ -203,11 +203,11 @@ function view_test_destroy() {
$handler->display->display_options['filters']['title']['field'] = 'title';
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler = $view->newDisplay('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'test_destroy';
/* Display: Attachment */
$handler = $view->new_display('attachment', 'Attachment', 'attachment_1');
$handler = $view->newDisplay('attachment', 'Attachment', 'attachment_1');
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['displays'] = array(
'default' => 'default',
......@@ -215,7 +215,7 @@ function view_test_destroy() {
);
/* Display: Attachment */
$handler = $view->new_display('attachment', 'Attachment', 'attachment_2');
$handler = $view->newDisplay('attachment', 'Attachment', 'attachment_2');
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['displays'] = array(
'default' => 'default',
......@@ -258,7 +258,7 @@ function view_test_delete() {
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler = $view->newDisplay('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
......
......@@ -180,7 +180,7 @@ protected function getBasicPageView() {
// the exposed forms cache.
drupal_static_reset('views_exposed_form_cache');
$display = $view->new_display('page', 'Page', 'page_1');
$display = $view->newDisplay('page', 'Page', 'page_1');
return $view;
}
......@@ -385,11 +385,11 @@ protected function getBasicView() {
// Create the basic view.
$view = new View(array(), 'view');
$view->name = 'test_view';
$view->add_display('default');
$view->addDisplay('default');
$view->base_table = 'views_test';
// Set up the fields we need.
$display = $view->new_display('default', 'Master', 'default');
$display = $view->newDisplay('default', 'Master', 'default');