Prado\Collections\TPagedDataSource::setVirtualItemCount PHP Метод

setVirtualItemCount() публичный Метод

public setVirtualItemCount ( $value )
    public function setVirtualItemCount($value)
    {
        if (($value = TPropertyValue::ensureInteger($value)) >= 0) {
            $this->_virtualCount = $value;
        } else {
            throw new TInvalidDataValueException('pageddatasource_virtualitemcount_invalid');
        }
    }

Usage Example

Пример #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;
 }