getPagerId example

$this->pager->total_items = 10;
    $this->assertEquals(10, $this->pager->getTotalItems());
  }

  /** * Tests the getPagerId() method. * * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::getPagerId() */
  public function testGetPagerId() {
    // Should return 0 if 'id' is not set.     $this->assertEquals(0, $this->pager->getPagerId());

    $this->pager->options['id'] = 1;

    $this->assertEquals(1, $this->pager->getPagerId());
  }

  /** * Tests the usePager() method. * * @see \Drupal\views\Plugin\views\pager\PagerPluginBase::usePager() */
  
Home | Imprint | This part of the site doesn't use cookies.