class TheliaFormValidator implements TheliaFormValidatorInterface

Class TheliaFormValidator

Methods

__construct( TranslatorInterface $translator, $environment)

No description

Form
validateForm( BaseForm $aBaseForm, string $expectedMethod = null)

Validate a BaseForm

string
getErrorMessages( Form $form)

Get all errors that occurred in a form

Details

at line 34
__construct( TranslatorInterface $translator, $environment)

Parameters

TranslatorInterface $translator
$environment

at line 48
Form validateForm( BaseForm $aBaseForm, string $expectedMethod = null)

Validate a BaseForm

Parameters

BaseForm $aBaseForm the form
string $expectedMethod the expected method, POST or GET, or null for any of them

Return Value

Form Form the symfony form object

Exceptions

FormValidationException is the form contains error, or the method is not the right one

at line 101
string getErrorMessages( Form $form)

Get all errors that occurred in a form

Parameters

Form $form

Return Value

string the error string