public ViewExecutable::setOffset($offset)
Sets the offset on the pager.
Parameters
int $offset: The pager offset.
File
- core/modules/views/src/ViewExecutable.php, line 602
Class
- ViewExecutable
- Represents a view as a whole.
Namespace
Drupal\views
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | public function setOffset( $offset ) { // Check whether the element is pre rendered. At that point, the cache keys // cannot longer be manipulated. if ( empty ( $this ->element[ '#pre_rendered' ])) { $this ->element[ '#cache' ][ 'keys' ][] = 'offset:' . $offset ; } $this ->offset = $offset ; // If the pager is already initialized, pass it through to the pager. if (! empty ( $this ->pager)) { $this ->pager->setOffset( $offset ); } } |
Please login to continue.