protected function detectOtherValues()
    {
        $this->totalPages = ceil($this->maxItems / $this->itemsPerPage);

        $this->half = floor($this->numberOfPageLinks / 2);
        $this->startPage = $this->currentPage - $this->half;

        if ($this->startPage < 1) {
            $this->startPage = 1;
        }

        $this->endPage = $this->startPage + $this->numberOfPageLinks - 1;

        if ($this->endPage > $this->totalPages) {
            $this->endPage = $this->totalPages;
        }
    }