/** * {@inheritdoc} */ public function getTotal() { if ($this->total === null) { $totalRows = $this->dataProvider->getTotal($this->request); if ($totalRows === 0) { return 0; } $limit = $this->request->getLimit(); $this->total = $totalRows > $limit ? (int) ceil($totalRows / $limit) : 1; } return $this->total; }
/** * Get total number of records found by request * * @return int */ public function getTotal() { if ($this->totalRows === null) { $this->totalRows = $this->source->getTotal($this->getResolvedRequest()); } return $this->totalRows; }