Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PagerPluginBase.php

function PagerPluginBase::setCurrentPage

Set the current page.

Parameters

$number: If provided, the page number will be set to this. If NOT provided, the page number will be set from the global page array.

1 method overrides PagerPluginBase::setCurrentPage()
SqlBase::setCurrentPage in core/modules/views/src/Plugin/views/pager/SqlBase.php
Set the current page.

File

core/modules/views/src/Plugin/views/pager/PagerPluginBase.php, line 128

Class

PagerPluginBase
Base class for views pager plugins.

Namespace

Drupal\views\Plugin\views\pager

Code

public function setCurrentPage($number = NULL) {
    if (!is_numeric($number) || $number < 0) {
        $number = 0;
    }
    $this->current_page = $number;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal