/** * {@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 schema * * @return Schema */ public function getSchema() { if ($this->schema === null) { $this->schema = $this->source->getSchema(); } return $this->schema; }