Prado\Collections\TPagedDataSource::setCurrentPageIndex PHP Méthode

setCurrentPageIndex() public méthode

public setCurrentPageIndex ( $value )
    public function setCurrentPageIndex($value)
    {
        if (($value = TPropertyValue::ensureInteger($value)) < 0) {
            $value = 0;
        }
        $this->_currentPageIndex = $value;
    }

Usage Example

 /**
  * @return TPagedDataSource creates a paged data source
  */
 protected function createPagedDataSource()
 {
     $ds = new TPagedDataSource();
     $ds->setCurrentPageIndex($this->getCurrentPageIndex());
     $ds->setPageSize($this->getPageSize());
     $ds->setAllowPaging($this->getAllowPaging());
     $ds->setAllowCustomPaging($this->getAllowCustomPaging());
     $ds->setVirtualItemCount($this->getVirtualItemCount());
     return $ds;
 }