yii\data\DataProviderInterface::getPagination PHP Method

getPagination() public method

public getPagination ( ) : Pagination
return Pagination the pagination object. If this is false, it means the pagination is disabled.
    public function getPagination();

Usage Example

Example #1
0
 /**
  * Serializes a data provider.
  * @param DataProviderInterface $dataProvider
  * @return array the array representation of the data provider.
  */
 protected function serializeDataProvider($dataProvider)
 {
     $models = $this->serializeModels($dataProvider->getModels());
     if ($dataProvider->getPagination() === false) {
         return $models;
     } else {
         return ['total' => $dataProvider->getTotalCount(), 'rows' => $models];
     }
 }
All Usage Examples Of yii\data\DataProviderInterface::getPagination