function PagerPluginBase::hasMoreRecords

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/pager/PagerPluginBase.php \Drupal\views\Plugin\views\pager\PagerPluginBase::hasMoreRecords()
  2. 8.9.x core/modules/views/src/Plugin/views/pager/PagerPluginBase.php \Drupal\views\Plugin\views\pager\PagerPluginBase::hasMoreRecords()
  3. 10 core/modules/views/src/Plugin/views/pager/PagerPluginBase.php \Drupal\views\Plugin\views\pager\PagerPluginBase::hasMoreRecords()

Determine if there are more records available.

This is primarily used to control the display of a more link.

File

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

Class

PagerPluginBase
Base class for views pager plugins.

Namespace

Drupal\views\Plugin\views\pager

Code

public function hasMoreRecords() {
    return $this->getItemsPerPage() && $this->total_items > (intval($this->current_page) + 1) * $this->getItemsPerPage();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.