protected static function getRangeValues(AjaxChoiceLoaderInterface $choiceLoader)
    {
        $startTo = ($choiceLoader->getPageNumber() - 1) * $choiceLoader->getPageSize();
        $startTo = $startTo < 0 ? 0 : $startTo;
        $endTo = $startTo + $choiceLoader->getPageSize();

        if (0 >= $choiceLoader->getPageSize()) {
            $endTo = $choiceLoader->getSize();
        }

        if ($endTo > $choiceLoader->getSize()) {
            $endTo = $choiceLoader->getSize();
        }

        return [$startTo, $endTo];
    }
protected static function getRangeValues(AjaxChoiceLoaderInterface $choiceLoader)
    {
        $startTo = ($choiceLoader->getPageNumber() - 1) * $choiceLoader->getPageSize();
        $startTo = $startTo < 0 ? 0 : $startTo;
        $endTo = $startTo + $choiceLoader->getPageSize();

        if (0 >= $choiceLoader->getPageSize()) {
            $endTo = $choiceLoader->getSize();
        }

        if ($endTo > $choiceLoader->getSize()) {
            $endTo = $choiceLoader->getSize();
        }

        return [$startTo, $endTo];
    }
protected static function getRangeValues ( AjaxChoiceLoaderInterface $ choiceLoader ) { $ startTo = ( $ choiceLoader -> getPageNumber ( ) - 1 ) * $ choiceLoader -> getPageSize ( ) ; $ startTo = $ startTo < 0 ? 0 : $ startTo ; $ endTo = $ startTo + $ choiceLoader -> getPageSize ( ) ; if ( 0 >= $ choiceLoader -> getPageSize ( ) ) { $ endTo = $ choiceLoader -> getSize ( ) ; } if ( $ endTo > $ choiceLoader -> getSize ( ) ) { $ endTo = $ choiceLoader -> getSize ( ) ; } return [ $ startTo , $ endTo ] ; }
Gets range values.

@param AjaxChoiceLoaderInterface $choiceLoader The ajax choice loader

@return int[] The startTo and endTo
Gets range values .