private function addFieldConstraintOptions(array &$options, array $formFieldConfiguration)
    {
        if ($options['required'] === true) {
            $options['constraints'][] = new NotBlank();
        }

        if (isset($formFieldConfiguration['validators'])) {
            $options['constraints'] = array();
            foreach ($formFieldConfiguration['validators'] as $validatorClass => $validatorOptions) {
                $options['constraints'][] = new $validatorClass($validatorOptions);
            }
        }
    }
private function addFieldConstraintOptions(array &$options, array $formFieldConfiguration)
    {
        if ($options['required'] === true) {
            $options['constraints'][] = new NotBlank();
        }

        if (isset($formFieldConfiguration['validators'])) {
            $options['constraints'] = array();
            foreach ($formFieldConfiguration['validators'] as $validatorClass => $validatorOptions) {
                $options['constraints'][] = new $validatorClass($validatorOptions);
            }
        }
    }
private function addFieldConstraintOptions ( array & $ options , array $ formFieldConfiguration ) { if ( $ options [ 'required' ] === true ) { $ options [ 'constraints' ] [ ] = new NotBlank ( ) ; } if ( isset ( $ formFieldConfiguration [ 'validators' ] ) ) { $ options [ 'constraints' ] = array ( ) ; foreach ( $ formFieldConfiguration [ 'validators' ] as $ validatorClass => $ validatorOptions ) { $ options [ 'constraints' ] [ ] = new $ validatorClass ( $ validatorOptions ) ; } } }
Adds the constraints option to the field options.

@param array $options
@param array $formFieldConfiguration
Adds the constraints option to the field options .