Handler/FormHandler.php
protected function getDataListObjects(FormConfigInterface $config, array $objects)
    {
        $limit = $this->getLimit($config instanceof FormConfigListInterface ? $config->getLimit() : null);
        $dataList = $this->getDataList($config);

        if (null !== $limit && \count($dataList) > $limit) {
            $msg = $this->translator->trans('form_handler.size_exceeds', [
                '{{ limit }}' => $limit,
            ], 'FxpResource');

            throw new InvalidResourceException(sprintf($msg, $limit));
        }

        if (0 === \count($objects) && $config instanceof FormConfigListInterface) {
            $objects = $config->convertObjects($dataList);
        }

        $dataList = array_values($dataList);
        $objects = array_values($objects);

        return [$dataList, $objects];
    }
protected function getDataListObjects(FormConfigInterface $config, array $objects)
    {
        $limit = $this->getLimit($config instanceof FormConfigListInterface ? $config->getLimit() : null);
        $dataList = $this->getDataList($config);

        if (null !== $limit && \count($dataList) > $limit) {
            $msg = $this->translator->trans('form_handler.size_exceeds', [
                '{{ limit }}' => $limit,
            ], 'FxpResource');

            throw new InvalidResourceException(sprintf($msg, $limit));
        }

        if (0 === \count($objects) && $config instanceof FormConfigListInterface) {
            $objects = $config->convertObjects($dataList);
        }

        $dataList = array_values($dataList);
        $objects = array_values($objects);

        return [$dataList, $objects];
    }
protected function getDataListObjects ( FormConfigInterface $ config , array $ objects ) { $ limit = $ this -> getLimit ( $ config instanceof FormConfigListInterface ? $ config -> getLimit ( ) : null ) ; $ dataList = $ this -> getDataList ( $ config ) ; if ( null !== $ limit && \ count ( $ dataList ) > $ limit ) { $ msg = $ this -> translator -> trans ( 'form_handler.size_exceeds' , [ '{{ limit }}' => $ limit , ] , 'FxpResource' ) ; throw new InvalidResourceException ( sprintf ( $ msg , $ limit ) ) ; } if ( 0 === \ count ( $ objects ) && $ config instanceof FormConfigListInterface ) { $ objects = $ config -> convertObjects ( $ dataList ) ; } $ dataList = array_values ( $ dataList ) ; $ objects = array_values ( $ objects ) ; return [ $ dataList , $ objects ] ; }
Get the data list and objects.

@param FormConfigInterface $config  The form config
@param array[]|object[]    $objects The list of object instance

@return array
Get the data list and objects .