summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2013-06-05 02:30:02 (GMT)
committerwebchick2013-06-05 02:30:02 (GMT)
commit6952fa75da9e767e45be637ee821e8ce28e51651 (patch)
tree51e55988ce8a43d662b337f93d564009b7cfb767
parentdb7edce355571e611e7e0ab643b9cfe643ce6a9d (diff)
Issue #2002968 by zhgenti | heddn: Rename Views method get_offset() to getOffset().
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php4
-rw-r--r--core/modules/views/lib/Drupal/views/ViewExecutable.php2
4 files changed, 5 insertions, 5 deletions
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 e87134e..11874fe 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 @@ abstract class PagerPluginBase extends PluginBase {
* 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() {
+ public 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 645e367..4a5d618 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 @@ abstract class SqlBase extends PagerPluginBase {
'#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 2114de9..55f2f0c 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 @@ class PagerTest extends PluginTestBase {
$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 @@ class PagerTest extends PluginTestBase {
$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 5d8039d..3190b79 100644
--- a/core/modules/views/lib/Drupal/views/ViewExecutable.php
+++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php
@@ -500,7 +500,7 @@ class ViewExecutable {
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)) {