Configuration/FormConfigurationFactory.php
public function buildByType(AbstractType $type, $formData, $locale, $attributes)
    {
        $config = $this->create($locale);
        $config->setFileFields(array_fill_keys($type->getFileFields(), $type->getCollectionId()));

        $attributes['form'] = [
            'data' => $formData,
        ];

        $adminMailConfiguration = $this->buildAdminMailConfigurationByTypeAndData(
            $type,
            $formData,
            $locale,
            $attributes
        );
        $websiteMailConfiguration = $this->buildWebsiteMailConfigurationByTypeAndData(
            $type,
            $formData,
            $locale,
            $attributes
        );

        $config->setAdminMailConfiguration($adminMailConfiguration);
        $config->setWebsiteMailConfiguration($websiteMailConfiguration);

        return $config;
    }
public function buildByType(AbstractType $type, $formData, $locale, $attributes)
    {
        $config = $this->create($locale);
        $config->setFileFields(array_fill_keys($type->getFileFields(), $type->getCollectionId()));

        $attributes['form'] = [
            'data' => $formData,
        ];

        $adminMailConfiguration = $this->buildAdminMailConfigurationByTypeAndData(
            $type,
            $formData,
            $locale,
            $attributes
        );
        $websiteMailConfiguration = $this->buildWebsiteMailConfigurationByTypeAndData(
            $type,
            $formData,
            $locale,
            $attributes
        );

        $config->setAdminMailConfiguration($adminMailConfiguration);
        $config->setWebsiteMailConfiguration($websiteMailConfiguration);

        return $config;
    }
Build by type.

@param AbstractType $type
@param mixed $formData
@param string $locale
@param array $attributes

@return FormConfigurationInterface