Medooch/Components/Controller/AbstractController.php
protected function getTotalOfRecordsString(int $totalOfRecords, array $data)
    {
        $show = $data['show'];
        $page = $data['page'];

        $startRecord = 0;
        if (intval($totalOfRecords) > 0) {
            $startRecord = ($show * ($page - 1)) + 1;
        }
        $endRecord = $show * $page;

        if ($endRecord > $totalOfRecords) {
            $endRecord = $totalOfRecords;
        }
        return $this->trans('totalOfRecordsString', [
            '%$startRecord%' => $startRecord,
            '%$endRecord%' => $endRecord,
            '%$totalOfRecords%' => $totalOfRecords,
        ], 'messages');
    }
protected function getTotalOfRecordsString(int $totalOfRecords, array $data)
    {
        $show = $data['show'];
        $page = $data['page'];

        $startRecord = 0;
        if (intval($totalOfRecords) > 0) {
            $startRecord = ($show * ($page - 1)) + 1;
        }
        $endRecord = $show * $page;

        if ($endRecord > $totalOfRecords) {
            $endRecord = $totalOfRecords;
        }
        return $this->trans('totalOfRecordsString', [
            '%$startRecord%' => $startRecord,
            '%$endRecord%' => $endRecord,
            '%$totalOfRecords%' => $totalOfRecords,
        ], 'messages');
    }
protected function getTotalOfRecordsString ( int $ totalOfRecords , array $ data ) { $ show = $ data [ 'show' ] ; $ page = $ data [ 'page' ] ; $ startRecord = 0 ; if ( intval ( $ totalOfRecords ) > 0 ) { $ startRecord = ( $ show * ( $ page - 1 ) ) + 1 ; } $ endRecord = $ show * $ page ; if ( $ endRecord > $ totalOfRecords ) { $ endRecord = $ totalOfRecords ; } return $ this -> trans ( 'totalOfRecordsString' , [ '%$startRecord%' => $ startRecord , '%$endRecord%' => $ endRecord , '%$totalOfRecords%' => $ totalOfRecords , ] , 'messages' ) ; }
Calculates the total of records string
@param int $totalOfRecords
@param array $data
@return string
Calculates the total of records string