diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php index 49ef067..fac99da 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php @@ -87,7 +87,7 @@ function set_items_per_page($items) { * Even pagers that don't actually page can skip items at the beginning, * so few pagers will need to override this method. */ - function get_offset() { + function getOffset() { return isset($this->options['offset']) ? $this->options['offset'] : 0; } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php index f7eb34b..5370d29 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php @@ -361,7 +361,7 @@ function exposed_form_alter(&$form, &$form_state) { '#size' => 10, '#maxlength' => 10, '#title' => $this->options['expose']['offset_label'], - '#default_value' => $this->get_offset(), + '#default_value' => $this->getOffset(), ); } } diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php index 13d30ef..53ccfdc 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php @@ -279,7 +279,7 @@ function testPagerApi() { $this->assertEqual($view->getOffset(), NULL, 'If the pager is not initialized and no manual override there is no offset.'); $rand_number = rand(1, 5); $view->setOffset($rand_number); - $this->assertEqual($view->getOffset(), $rand_number, 'Make sure get_offset uses the settings of set_offset.'); + $this->assertEqual($view->getOffset(), $rand_number, 'Make sure getOffset uses the settings of set_offset.'); $this->assertEqual($view->getCurrentPage(), NULL, 'If the pager is not initialized and no manual override there is no current page.'); $rand_number = rand(1, 5); @@ -305,7 +305,7 @@ function testPagerApi() { $view->setOffset($rand_number); $rand_number = rand(6, 11); $view->pager->set_offset($rand_number); - $this->assertEqual($view->getOffset(), $rand_number, 'Make sure get_offset uses the settings of set_offset.'); + $this->assertEqual($view->getOffset(), $rand_number, 'Make sure getOffset uses the settings of set_offset.'); $this->assertEqual($view->getCurrentPage(), 0, 'Per default the current page is 0.'); $rand_number = rand(1, 5); diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index a8a8dd2..c8b2f4d 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -518,7 +518,7 @@ public function setItemsPerPage($items_per_page) { public function getOffset() { // If the pager is already initialized, pass it through to the pager. if (!empty($this->pager)) { - return $this->pager->get_offset(); + return $this->pager->getOffset(); } if (isset($this->offset)) {