private function getDefaults(Form $formEntity, $locale)
    {
        // set Defaults
        $defaults = [];

        foreach ($formEntity->getFields() as $field) {
            $fieldTranslation = $field->getTranslation($locale);

            if ($fieldTranslation && $fieldTranslation->getDefaultValue()) {
                $value = $this->formFieldTypePool->get($field->getType())->getDefaultValue($field, $locale);
                $defaults[$field->getKey()] = $value;
            }
        }

        return $defaults;
    }
private function getDefaults(Form $formEntity, $locale)
    {
        // set Defaults
        $defaults = [];

        foreach ($formEntity->getFields() as $field) {
            $fieldTranslation = $field->getTranslation($locale);

            if ($fieldTranslation && $fieldTranslation->getDefaultValue()) {
                $value = $this->formFieldTypePool->get($field->getType())->getDefaultValue($field, $locale);
                $defaults[$field->getKey()] = $value;
            }
        }

        return $defaults;
    }
private function getDefaults ( Form $ formEntity , $ locale ) { // set Defaults $ defaults = [ ] ; foreach ( $ formEntity -> getFields ( ) as $ field ) { $ fieldTranslation = $ field -> getTranslation ( $ locale ) ; if ( $ fieldTranslation && $ fieldTranslation -> getDefaultValue ( ) ) { $ value = $ this -> formFieldTypePool -> get ( $ field -> getType ( ) ) -> getDefaultValue ( $ field , $ locale ) ; $ defaults [ $ field -> getKey ( ) ] = $ value ; } } return $ defaults ; }
Get defaults.

@param Form $formEntity
@param string $locale

@return array
Get defaults .