public function pageFromQuery()
    {
        if ($this->request) {
            $page = $this->request->query->getInt('page');
        } else {
            $page = 0;
        }

        return ($page > 0) ? $page : 1;
    }