/** * @return int */ public function getCountEnd() { if ($this->countEnd === NULL) { $this->countEnd = $this->grid->getCount() > 0 ? min($this->grid->getCount(), $this->getPage() * $this->grid->getPerPage()) : 0; } return $this->countEnd; }