models/BaseDataModel.php
public function calcPage($currentQuery = null)
    {
        $page = 1;
        $primaryKeys = static::primaryKey();
        if (isset($primaryKeys[0])) {
            $primaryKey = $primaryKeys[0];
            $num = $this->getOrderNumber($this->$primaryKey, $currentQuery);
            if ($num > 0) {
                $page = (int) ceil($num / $this->pageSize);
            }
        }
        return $page;
    }
public function calcPage($currentQuery = null)
    {
        $page = 1;
        $primaryKeys = static::primaryKey();
        if (isset($primaryKeys[0])) {
            $primaryKey = $primaryKeys[0];
            $num = $this->getOrderNumber($this->$primaryKey, $currentQuery);
            if ($num > 0) {
                $page = (int) ceil($num / $this->pageSize);
            }
        }
        return $page;
    }
public function calcPage ( $ currentQuery = null ) { $ page = 1 ; $ primaryKeys = static :: primaryKey ( ) ; if ( isset ( $ primaryKeys [ 0 ] ) ) { $ primaryKey = $ primaryKeys [ 0 ] ; $ num = $ this -> getOrderNumber ( $ this -> $ primaryKey , $ currentQuery ) ; if ( $ num > 0 ) { $ page = ( int ) ceil ( $ num / $ this -> pageSize ) ; } } return $ page ; }
Calculate page number for current record.
Calculate page number for current record .