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

Breadcrumb

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

function SqlBase::getPagerTotal

File

core/modules/views/src/Plugin/views/pager/SqlBase.php, line 316

Class

SqlBase
A common base class for sql based pager.

Namespace

Drupal\views\Plugin\views\pager

Code

public function getPagerTotal() {
    if ($items_per_page = intval($this->getItemsPerPage())) {
        return ceil($this->total_items / $items_per_page);
    }
    else {
        return 1;
    }
}

API Navigation

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