When [[getPagination|pagination]] is false, this is the same as [[getCount|count]].
public getTotalCount ( ) : integer | ||
return | integer | total number of possible data models. |
/** * 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]; } }