Prado\Data\SqlMap\DataMapper\TSqlMapPagedList::getOffsetAndLimit PHP Method

getOffsetAndLimit() protected method

Calculate the data fetch offsets and limits.
protected getOffsetAndLimit ( $param ) : array
return array 1st element is the offset, 2nd element is the limit.
    protected function getOffsetAndLimit($param)
    {
        $index = $param->getNewPageIndex();
        $pageSize = $this->getPageSize();
        return $index < 1 ? array($index, $pageSize * 2) : array(($index - 1) * $pageSize, $pageSize * 3);
    }