TPagedDataSource implements an integer-indexed collection class with paging functionality. Data items in TPagedDataSource can be traversed using foreach PHP statement like the following, foreach($pagedDataSource as $dataItem) The data are fetched from {@link setDataSource DataSource}. Only the items within the specified page will be returned and traversed.
Since: 3.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends Prado\TComponent, implements IteratorAggregate, implements Countable
Beispiel #1
0
 /**
  * @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;
 }