protected function getPageFromInput($currentPage = null, array $options = [])
    {
        if (is_numeric($currentPage)) {
            return intval($currentPage);
        }

        $pageName = (array_key_exists('pageName', $options)) ? $options['pageName'] : 'page';

        $page = $this->request->input($pageName);

        if (is_numeric($page)) {
            return intval($page);
        }

        return 1;
    }