public static function paginateChoices(AjaxChoiceLoaderInterface $choiceLoader, array $choices)
    {
        list($startTo, $endTo) = static::getRangeValues($choiceLoader);

        // group
        if (\is_array(current($choices))) {
            return static::paginateGroupChoices($choices, $startTo, $endTo);
        }

        return static::paginateSimpleChoices($choices, $startTo, $endTo);
    }
public static function paginateChoices(AjaxChoiceLoaderInterface $choiceLoader, array $choices)
    {
        list($startTo, $endTo) = static::getRangeValues($choiceLoader);

        // group
        if (\is_array(current($choices))) {
            return static::paginateGroupChoices($choices, $startTo, $endTo);
        }

        return static::paginateSimpleChoices($choices, $startTo, $endTo);
    }
public static function paginateChoices ( AjaxChoiceLoaderInterface $ choiceLoader , array $ choices ) { list ( $ startTo , $ endTo ) = static :: getRangeValues ( $ choiceLoader ) ; // group if ( \ is_array ( current ( $ choices ) ) ) { return static :: paginateGroupChoices ( $ choices , $ startTo , $ endTo ) ; } return static :: paginateSimpleChoices ( $ choices , $ startTo , $ endTo ) ; }
Paginate the flatten choices.

@param AjaxChoiceLoaderInterface $choiceLoader The choice loader
@param array                     $choices      The choices

@return array The paginated choices
Paginate the flatten choices .