public getPagination ( ) : |
||
return | the pagination object. If this is false, it means the pagination is disabled. |
public function getPagination();
/** * 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]; } }