Beispiel #1
0
 /**
  * Get the pager offset from the pager.
  */
 public function getOffset()
 {
     // If the pager is already initialized, pass it through to the pager.
     if (!empty($this->pager)) {
         return $this->pager->getOffset();
     }
     if (isset($this->offset)) {
         return $this->offset;
     }
 }
Beispiel #2
0
 /**
  * Tests the setOffset() method.
  *
  * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::setOffset()
  */
 public function testSetOffset()
 {
     $this->pager->setOffset(2);
     $this->assertEquals(2, $this->pager->getOffset());
 }