diff --git a/includes/admin.inc b/includes/admin.inc index 935fa64225e580f3dcbce84c196e8f5ef13f5725..85f4c35abd2399d410b0fbd015cf496e37892df5 100644 --- a/includes/admin.inc +++ b/includes/admin.inc @@ -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]) { diff --git a/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php b/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php index 6d33eb6df722773090f0ebe0512bef81b918c07f..45c49e643bf28684ef1a2c90c5c2205527181ab5 100644 --- a/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php +++ b/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php @@ -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', diff --git a/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php b/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php index ebcf3b39620f74e0025131327159a50ef257cc26..38a6d1480a2ea44bdfd293af8a5200da11fff29c 100644 --- a/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php +++ b/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php @@ -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'])) { diff --git a/lib/Drupal/views/Tests/Comment/CommentTestBase.php b/lib/Drupal/views/Tests/Comment/CommentTestBase.php index 390da88d31c3942ee1cd2f6666a1897df99c85e7..7ef2b75473efa2898fdc5925d17479172414e9fc 100644 --- a/lib/Drupal/views/Tests/Comment/CommentTestBase.php +++ b/lib/Drupal/views/Tests/Comment/CommentTestBase.php @@ -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'; diff --git a/lib/Drupal/views/Tests/Comment/FilterUserUIDTest.php b/lib/Drupal/views/Tests/Comment/FilterUserUIDTest.php index e5d52414cd5f715843f4bbe5f2fd795622a3d0e5..e3bea5f91273bcd3f92eb58964cc0a495c03ea47 100644 --- a/lib/Drupal/views/Tests/Comment/FilterUserUIDTest.php +++ b/lib/Drupal/views/Tests/Comment/FilterUserUIDTest.php @@ -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; } diff --git a/lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php b/lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php index cd8659075adff9a4c02be604b01da9a40a1059db..32de41311e8bb41c91b92116edac4ddd7f51205d 100644 --- a/lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php +++ b/lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/Handler/ArgumentStringTest.php b/lib/Drupal/views/Tests/Handler/ArgumentStringTest.php index 5059022850fb9ce359417c11d22fb6314301c90f..8f6d072737a79170b2e29bb12634ddf304cf8176 100644 --- a/lib/Drupal/views/Tests/Handler/ArgumentStringTest.php +++ b/lib/Drupal/views/Tests/Handler/ArgumentStringTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/Handler/FilterDateTest.php b/lib/Drupal/views/Tests/Handler/FilterDateTest.php index c6b4b8f12991fa9f6732e96b7ff778ce3b542221..f4df461f680e44466bbfccc551c428f53f0100a1 100644 --- a/lib/Drupal/views/Tests/Handler/FilterDateTest.php +++ b/lib/Drupal/views/Tests/Handler/FilterDateTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/Plugin/AccessTest.php b/lib/Drupal/views/Tests/Plugin/AccessTest.php index d9ec166cb07771c57eaddb03cef1bbee9b6990bc..5950a5dfac78660b8b0e62449409711a8a8002da 100644 --- a/lib/Drupal/views/Tests/Plugin/AccessTest.php +++ b/lib/Drupal/views/Tests/Plugin/AccessTest.php @@ -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; diff --git a/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php b/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php index 3428e049e78e916dbf89011d403a3e7f1ecf4656..a11c2b158e31f759ce4163dda452c955b23830b6 100644 --- a/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php +++ b/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/Plugin/ArgumentValidatorTest.php b/lib/Drupal/views/Tests/Plugin/ArgumentValidatorTest.php index 80983277413d33c76b7754cf1efd0245cb4453f6..a400fd92cf0352db7ac9a07022479d076f498928 100644 --- a/lib/Drupal/views/Tests/Plugin/ArgumentValidatorTest.php +++ b/lib/Drupal/views/Tests/Plugin/ArgumentValidatorTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/Plugin/CacheTest.php b/lib/Drupal/views/Tests/Plugin/CacheTest.php index 8bae69fdaa8dbc2a4295270d5a3bbb00fa539d81..ed22e0a1961e6c6b57492129446d95a0b5fb6aef 100644 --- a/lib/Drupal/views/Tests/Plugin/CacheTest.php +++ b/lib/Drupal/views/Tests/Plugin/CacheTest.php @@ -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', diff --git a/lib/Drupal/views/Tests/Plugin/DisplayTest.php b/lib/Drupal/views/Tests/Plugin/DisplayTest.php index c937e0fb960b359ba92548ff08f6ceeb2a938ded..10a38617cb4f66c8df72a461b97322e143959777 100644 --- a/lib/Drupal/views/Tests/Plugin/DisplayTest.php +++ b/lib/Drupal/views/Tests/Plugin/DisplayTest.php @@ -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', diff --git a/lib/Drupal/views/Tests/Plugin/PagerTest.php b/lib/Drupal/views/Tests/Plugin/PagerTest.php index 117a8f0db570a336b6e60e072933daa7270f0133..053f6fa69c23871972cac56cb451cce6193e98f8 100644 --- a/lib/Drupal/views/Tests/Plugin/PagerTest.php +++ b/lib/Drupal/views/Tests/Plugin/PagerTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/QueryGroupByTest.php b/lib/Drupal/views/Tests/QueryGroupByTest.php index e9f8407b8746c0ef27cf7a122e431c33e2364f8d..b5337731dc26821e1b5816d10e57381d4120d0a6 100644 --- a/lib/Drupal/views/Tests/QueryGroupByTest.php +++ b/lib/Drupal/views/Tests/QueryGroupByTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/Taxonomy/RelationshipNodeTermDataTest.php b/lib/Drupal/views/Tests/Taxonomy/RelationshipNodeTermDataTest.php index 0e3923eafee66af063bb34d4c78c50221b172a8c..cf6dab55db6de80c3c8f2cb04ff32d86d5130976 100644 --- a/lib/Drupal/views/Tests/Taxonomy/RelationshipNodeTermDataTest.php +++ b/lib/Drupal/views/Tests/Taxonomy/RelationshipNodeTermDataTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/TranslatableTest.php b/lib/Drupal/views/Tests/TranslatableTest.php index 8d00048ea59a971e0707be83673563adf3546397..f9183d184fe9df2ed53230b0e6e18470163b1935 100644 --- a/lib/Drupal/views/Tests/TranslatableTest.php +++ b/lib/Drupal/views/Tests/TranslatableTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/UpgradeTestCase.php b/lib/Drupal/views/Tests/UpgradeTestCase.php index affe8afdcc4ad55d722c0e5aa8391c0b344ab287..e21da9dd2b5517c63c6a08fb63f597406af59118 100644 --- a/lib/Drupal/views/Tests/UpgradeTestCase.php +++ b/lib/Drupal/views/Tests/UpgradeTestCase.php @@ -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" ;'; diff --git a/lib/Drupal/views/Tests/User/ArgumentDefaultTest.php b/lib/Drupal/views/Tests/User/ArgumentDefaultTest.php index 7fa571c6d375c161973f00fcc5fd902891bd06ef..8b6b9f8004ec11d69ddbb001f42aecd44e8fa567 100644 --- a/lib/Drupal/views/Tests/User/ArgumentDefaultTest.php +++ b/lib/Drupal/views/Tests/User/ArgumentDefaultTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/User/ArgumentValidateTest.php b/lib/Drupal/views/Tests/User/ArgumentValidateTest.php index d52d771744ef70f769349548c873e281e0465b97..41b18d822dd539a3eed07b6f6b3d963e898b206d 100644 --- a/lib/Drupal/views/Tests/User/ArgumentValidateTest.php +++ b/lib/Drupal/views/Tests/User/ArgumentValidateTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/User/HandlerFieldUserNameTest.php b/lib/Drupal/views/Tests/User/HandlerFieldUserNameTest.php index 5b86a5c4324c662f74649804634eaf9ba4520eda..a9f8fddab5ca9e23d6b1ea2a6c0bd954e88a6f18 100644 --- a/lib/Drupal/views/Tests/User/HandlerFieldUserNameTest.php +++ b/lib/Drupal/views/Tests/User/HandlerFieldUserNameTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/User/UserTest.php b/lib/Drupal/views/Tests/User/UserTest.php index 4e3f593976cda8174f38fc922a5601179299874e..40cca1612ff99a920e9b59532cef27edbc69a41d 100644 --- a/lib/Drupal/views/Tests/User/UserTest.php +++ b/lib/Drupal/views/Tests/User/UserTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/ViewStorageTest.php b/lib/Drupal/views/Tests/ViewStorageTest.php index 08a5fc6a9b93b4e6c7d8a92993c311a16498b327..79bbc65119533d78dda62c5d9a9470e09f02c8c2 100644 --- a/lib/Drupal/views/Tests/ViewStorageTest.php +++ b/lib/Drupal/views/Tests/ViewStorageTest.php @@ -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.'); diff --git a/lib/Drupal/views/Tests/ViewTest.php b/lib/Drupal/views/Tests/ViewTest.php index 6d11f5bdf4769ec3f930121d4f551bc21e50abaa..a6dfb0d3eda0e9a3a0920bd3e56172f637b293e9 100644 --- a/lib/Drupal/views/Tests/ViewTest.php +++ b/lib/Drupal/views/Tests/ViewTest.php @@ -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'; diff --git a/lib/Drupal/views/Tests/ViewTestBase.php b/lib/Drupal/views/Tests/ViewTestBase.php index a2f9b29fcd54ddd6dce0ff4205106aaf987b645a..7ffdbeb8dc5c7a4d4ef9b0a3102dba8e5eb9375d 100644 --- a/lib/Drupal/views/Tests/ViewTestBase.php +++ b/lib/Drupal/views/Tests/ViewTestBase.php @@ -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'); $display->overrideOption('fields', array( 'id' => array( 'id' => 'id', diff --git a/lib/Drupal/views/View.php b/lib/Drupal/views/View.php index f2be380cbe04202c8930859906c526737f410225..d1e2067a12e799d196413dd39b7c1b68368db41c 100644 --- a/lib/Drupal/views/View.php +++ b/lib/Drupal/views/View.php @@ -641,7 +641,7 @@ public function fixMissingRelationships() { $info = $data['table']['default_relationship'][$this->base_table]; $relationship_options = isset($info['options']) ? $info['options'] : array(); - $relationship = $this->add_item($this->current_display, 'relationship', $info['table'], $info['field'], $relationship_options); + $relationship = $this->addItem($this->current_display, 'relationship', $info['table'], $info['field'], $relationship_options); } foreach ($handlers as $handler) { $options = $this->display_handler->getOption($types[$handler['type']]['plural']); diff --git a/lib/Drupal/views/ViewStorage.php b/lib/Drupal/views/ViewStorage.php index 91d9cf2130152f48810d6ce8b3a451bd56623d20..f69479be8d3e4507b856042236a79942ae7d4a7e 100644 --- a/lib/Drupal/views/ViewStorage.php +++ b/lib/Drupal/views/ViewStorage.php @@ -58,7 +58,7 @@ public function isEnabled() { * The key to the display in $view->display, or FALSE if no plugin ID was * provided. */ - function add_display($plugin_id = 'page', $title = NULL, $id = NULL) { + public function addDisplay($plugin_id = 'page', $title = NULL, $id = NULL) { if (empty($plugin_id)) { return FALSE; } @@ -69,7 +69,7 @@ function add_display($plugin_id = 'page', $title = NULL, $id = NULL) { } if (empty($id)) { - $id = $this->generate_display_id($plugin_id); + $id = $this->generateDisplayId($plugin_id); // Generate a unique human-readable name by inspecting the counter at the // end of the previous display ID, e.g., 'page_1'. @@ -111,7 +111,7 @@ function add_display($plugin_id = 'page', $title = NULL, $id = NULL) { * @param string $plugin_id * Which plugin should be used for the new display ID. */ - function generate_display_id($plugin_id) { + protected function generateDisplayId($plugin_id) { // 'default' is singular and is unique, so just go with 'default' // for it. For all others, start counting. if ($plugin_id == 'default') { @@ -147,7 +147,7 @@ function generate_display_id($plugin_id) { * integer to make it unique, e.g., "{$requested_id}_1", * "{$requested_id}_2", etc. */ - public static function generate_item_id($requested_id, $existing_items) { + public static function generateItemId($requested_id, $existing_items) { $count = 0; $id = $requested_id; while (!empty($existing_items[$id])) { @@ -171,8 +171,8 @@ public static function generate_item_id($requested_id, $existing_items) { * @return Drupal\views\Plugin\views\display\DisplayPluginBase * A reference to the new handler object. */ - function &new_display($plugin_id = 'page', $title = NULL, $id = NULL) { - $id = $this->add_display($plugin_id, $title, $id); + public function &newDisplay($plugin_id = 'page', $title = NULL, $id = NULL) { + $id = $this->addDisplay($plugin_id, $title, $id); // Create a handler. $this->display[$id]->handler = views_get_plugin('display', $this->display[$id]->display_plugin); @@ -216,14 +216,14 @@ function &new_display($plugin_id = 'page', $title = NULL, $id = NULL) { * @return string * The unique ID for this handler instance. */ - function add_item($display_id, $type, $table, $field, $options = array(), $id = NULL) { + public function addItem($display_id, $type, $table, $field, $options = array(), $id = NULL) { $types = View::viewsObjectTypes(); $this->setDisplay($display_id); $fields = $this->display[$display_id]->handler->getOption($types[$type]['plural']); if (empty($id)) { - $id = $this->generate_item_id($field, $fields); + $id = $this->generateItemId($field, $fields); } // If the desired type is not found, use the original value directly. @@ -255,7 +255,7 @@ function add_item($display_id, $type, $table, $field, $options = array(), $id = * @return array * An array of handler instances of a given type for this display. */ - function get_items($type, $display_id = NULL) { + public function getItems($type, $display_id = NULL) { $this->setDisplay($display_id); if (!isset($display_id)) { @@ -281,7 +281,7 @@ function get_items($type, $display_id = NULL) { * Either the handler instance's configuration, or NULL if the handler is * not used on the display. */ - function get_item($display_id, $type, $id) { + public function getItem($display_id, $type, $id) { // Get info about the types so we can get the right data. $types = View::viewsObjectTypes(); // Initialize the display @@ -307,7 +307,7 @@ function get_item($display_id, $type, $id) { * * @see set_item_option() */ - function set_item($display_id, $type, $id, $item) { + public function setItem($display_id, $type, $id, $item) { // Get info about the types so we can get the right data. $types = View::viewsObjectTypes(); // Initialize the display. @@ -346,10 +346,10 @@ function set_item($display_id, $type, $id, $item) { * * @see set_item() */ - function set_item_option($display_id, $type, $id, $option, $value) { - $item = $this->get_item($display_id, $type, $id); + public function setItemOption($display_id, $type, $id, $option, $value) { + $item = $this->getItem($display_id, $type, $id); $item[$option] = $value; - $this->set_item($display_id, $type, $id, $item); + $this->setItem($display_id, $type, $id, $item); } } diff --git a/modules/node.views_template.inc b/modules/node.views_template.inc index a2da7fa3d8e36aa4d3ca8d49887d926cb0eff762..fbf6d7ba6c539b0cbeb077c0f2867fadea39fc70 100644 --- a/modules/node.views_template.inc +++ b/modules/node.views_template.inc @@ -21,7 +21,7 @@ function node_views_templates() { $view->disabled = TRUE; /* 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'] = 'Image gallery'; $handler->display->display_options['access']['type'] = 'perm'; $handler->display->display_options['cache']['type'] = 'none'; @@ -109,7 +109,7 @@ function node_views_templates() { $handler->display->display_options['filters']['status']['value'] = '1'; /* Display: Gallery page */ - $handler = $view->new_display('page', 'Gallery page', 'page_1'); + $handler = $view->newDisplay('page', 'Gallery page', 'page_1'); $handler->display->display_options['path'] = 'gallery'; $translatables['image_gallery'] = array( t('Defaults'), diff --git a/views.api.php b/views.api.php index 0b5b52a8eb039b6a31dba96cc42a5914fdeacf3e..7fb2c358774cbf9ea75d262f6ad7f680a2778864 100644 --- a/views.api.php +++ b/views.api.php @@ -677,7 +677,7 @@ function hook_views_default_views() { $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'; @@ -712,11 +712,11 @@ function hook_views_default_views() { $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE; /* Display: Page */ - $handler = $view->new_display('page', 'Page', 'page'); + $handler = $view->newDisplay('page', 'Page', 'page'); $handler->display->display_options['path'] = 'frontpage'; /* Display: Feed */ - $handler = $view->new_display('feed', 'Feed', 'feed'); + $handler = $view->newDisplay('feed', 'Feed', 'feed'); $handler->display->display_options['defaults']['title'] = FALSE; $handler->display->display_options['title'] = 'Front page feed'; $handler->display->display_options['pager']['type'] = 'some';