protected function sanitizeConfiguration(array $configuration)
    {
        // Removing configuration of fields which do not exist for this form.
        $sanitizedFieldsConfiguration = [];
        $fieldsConfiguration = (isset($configuration['fields']))
            ? $configuration['fields']
            : [];

        foreach ($this->formObject->getProperties() as $property) {
            $sanitizedFieldsConfiguration[$property] = (isset($fieldsConfiguration[$property]))
                ? $fieldsConfiguration[$property]
                : [];
        }

        $configuration['fields'] = $sanitizedFieldsConfiguration;

        return $configuration;
    }
protected function sanitizeConfiguration(array $configuration)
    {
        // Removing configuration of fields which do not exist for this form.
        $sanitizedFieldsConfiguration = [];
        $fieldsConfiguration = (isset($configuration['fields']))
            ? $configuration['fields']
            : [];

        foreach ($this->formObject->getProperties() as $property) {
            $sanitizedFieldsConfiguration[$property] = (isset($fieldsConfiguration[$property]))
                ? $fieldsConfiguration[$property]
                : [];
        }

        $configuration['fields'] = $sanitizedFieldsConfiguration;

        return $configuration;
    }
protected function sanitizeConfiguration ( array $ configuration ) { // Removing configuration of fields which do not exist for this form. $ sanitizedFieldsConfiguration = [ ] ; $ fieldsConfiguration = ( isset ( $ configuration [ 'fields' ] ) ) ? $ configuration [ 'fields' ] : [ ] ; foreach ( $ this -> formObject -> getProperties ( ) as $ property ) { $ sanitizedFieldsConfiguration [ $ property ] = ( isset ( $ fieldsConfiguration [ $ property ] ) ) ? $ fieldsConfiguration [ $ property ] : [ ] ; } $ configuration [ 'fields' ] = $ sanitizedFieldsConfiguration ; return $ configuration ; }
This function will clean the configuration array by removing useless data
and updating needed ones.

@param array $configuration
@return array
This function will clean the configuration array by removing useless data and updating needed ones .