private function calculateTotalPages()
    {
        // With zero items, there is still one page
        if ($this->getTotalItems() === 0) {
            $this->setTotalPages(1);
            return;
        }

        // The total amount of pages is calculated by dividing the total amount of items by the items per page
        $totalPages = ceil($this->getTotalItems() / $this->getLimit());

        $this->setTotalPages((int)$totalPages);
    }