public function setData($totalItems, $currentPage, $itemsPerPage = 12, $maxPages = 10)
    {
        $this->totalItems = $totalItems;
        $this->currentPage = $currentPage;
        $this->itemsPerPage = $itemsPerPage;

//        if ($maxPages < 3) {
//            throw new \InvalidArgumentException('Max pages has to be more than 3.');
//        }
        $this->maxPages = $maxPages;

        $this->numPages = (int) ceil($this->totalItems/$this->itemsPerPage);
    }