From f45fd0736e2e3949a6e87ac30c6d1600afe06383 Mon Sep 17 00:00:00 2001
From: damiankloip <damiankloip@1037976.no-reply.drupal.org>
Date: Fri, 31 Aug 2012 10:49:10 +0200
Subject: [PATCH] Issue #1765026 by damiankloip: CamelCase methods in
 ViewStorage class.

---
 includes/admin.inc                            | 34 +++++++++----------
 .../views/relationship/GroupwiseMax.php       |  8 ++---
 .../Plugin/views/wizard/WizardPluginBase.php  | 12 +++----
 .../views/Tests/Comment/CommentTestBase.php   |  2 +-
 .../views/Tests/Comment/FilterUserUIDTest.php |  4 +--
 .../Tests/Field/HandlerFieldFieldTest.php     |  2 +-
 .../Tests/Handler/ArgumentStringTest.php      |  2 +-
 .../views/Tests/Handler/FilterDateTest.php    |  2 +-
 lib/Drupal/views/Tests/Plugin/AccessTest.php  | 14 ++++----
 .../Tests/Plugin/ArgumentDefaultTest.php      |  2 +-
 .../Tests/Plugin/ArgumentValidatorTest.php    |  4 +--
 lib/Drupal/views/Tests/Plugin/CacheTest.php   |  4 +--
 lib/Drupal/views/Tests/Plugin/DisplayTest.php |  8 ++---
 lib/Drupal/views/Tests/Plugin/PagerTest.php   | 12 +++----
 lib/Drupal/views/Tests/QueryGroupByTest.php   |  6 ++--
 .../Taxonomy/RelationshipNodeTermDataTest.php |  2 +-
 lib/Drupal/views/Tests/TranslatableTest.php   |  2 +-
 lib/Drupal/views/Tests/UpgradeTestCase.php    | 12 +++----
 .../views/Tests/User/ArgumentDefaultTest.php  |  2 +-
 .../views/Tests/User/ArgumentValidateTest.php |  2 +-
 .../Tests/User/HandlerFieldUserNameTest.php   |  2 +-
 lib/Drupal/views/Tests/User/UserTest.php      |  2 +-
 lib/Drupal/views/Tests/ViewStorageTest.php    |  2 +-
 lib/Drupal/views/Tests/ViewTest.php           | 10 +++---
 lib/Drupal/views/Tests/ViewTestBase.php       |  6 ++--
 lib/Drupal/views/View.php                     |  2 +-
 lib/Drupal/views/ViewStorage.php              | 28 +++++++--------
 modules/node.views_template.inc               |  4 +--
 views.api.php                                 |  6 ++--
 29 files changed, 99 insertions(+), 99 deletions(-)

diff --git a/includes/admin.inc b/includes/admin.inc
index 935fa64225e5..85f4c35abd23 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 6d33eb6df722..45c49e643bf2 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 ebcf3b39620f..38a6d1480a2e 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 390da88d31c3..7ef2b75473ef 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 e5d52414cd5f..e3bea5f91273 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 cd8659075adf..32de41311e8b 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 5059022850fb..8f6d072737a7 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 c6b4b8f12991..f4df461f680e 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 d9ec166cb077..5950a5dfac78 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 3428e049e78e..a11c2b158e31 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 80983277413d..a400fd92cf03 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 8bae69fdaa8d..ed22e0a1961e 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 c937e0fb960b..10a38617cb4f 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 117a8f0db570..053f6fa69c23 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 e9f8407b8746..b5337731dc26 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 0e3923eafee6..cf6dab55db6d 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 8d00048ea59a..f9183d184fe9 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 affe8afdcc4a..e21da9dd2b55 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 7fa571c6d375..8b6b9f8004ec 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 d52d771744ef..41b18d822dd5 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 5b86a5c4324c..a9f8fddab5ca 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 4e3f593976cd..40cca1612ff9 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 08a5fc6a9b93..79bbc6511953 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 6d11f5bdf476..a6dfb0d3eda0 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 a2f9b29fcd54..7ffdbeb8dc5c 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 f2be380cbe04..d1e2067a12e7 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 91d9cf213015..f69479be8d3e 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 a2da7fa3d8e3..fbf6d7ba6c53 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 0b5b52a8eb03..7fb2c358774c 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';
-- 
GitLab