interface FormFactoryInterface

Allows creating a form based on a name, a class or a property.

Methods

FormInterface
create(string$type =FormType::class,mixed$data =null,array$options =[])

Returns a form.

FormInterface
createNamed(string$name,string$type =FormType::class,mixed$data =null,array$options =[])

Returns a form.

FormInterface
createForProperty(string$class,string$property,mixed$data =null,array$options =[])

Returns a form for a property of a class.

FormBuilderInterface
createBuilder(string$type =FormType::class,mixed$data =null,array$options =[])

Returns a form builder.

FormBuilderInterface
createNamedBuilder(string$name,string$type =FormType::class,mixed$data =null,array$options =[])

Returns a form builder.

FormBuilderInterface
createBuilderForProperty(string$class,string$property,mixed$data =null,array$options =[])

Returns a form builder for a property of a class.

Details

FormInterface create(string$type =FormType::class,mixed$data =null,array$options =[])

Returns a form.

Parameters

string $type
mixed $data
array $options

Return Value

FormInterface

Exceptions

InvalidOptionsException if any given option is not applicable to the given type

See also

createBuilder()

FormInterface createNamed(string$name,string$type =FormType::class,mixed$data =null,array$options =[])

Returns a form.

Parameters

string $name
string $type
mixed $data
array $options

Return Value

FormInterface

Exceptions

InvalidOptionsException if any given option is not applicable to the given type

See also

createNamedBuilder()

FormInterface createForProperty(string$class,string$property,mixed$data =null,array$options =[])

Returns a form for a property of a class.

Parameters

string $class
string $property
mixed $data
array $options

Return Value

FormInterface

Exceptions

InvalidOptionsException if any given option is not applicable to the form type

See also

createBuilderForProperty()

FormBuilderInterface createBuilder(string$type =FormType::class,mixed$data =null,array$options =[])

Returns a form builder.

Parameters

string $type
mixed $data
array $options

Return Value

FormBuilderInterface

Exceptions

InvalidOptionsException if any given option is not applicable to the given type

FormBuilderInterface createNamedBuilder(string$name,string$type =FormType::class,mixed$data =null,array$options =[])

Returns a form builder.

Parameters

string $name
string $type
mixed $data
array $options

Return Value

FormBuilderInterface

Exceptions

InvalidOptionsException if any given option is not applicable to the given type

FormBuilderInterface createBuilderForProperty(string$class,string$property,mixed$data =null,array$options =[])

Returns a form builder for a property of a class.

If any of the 'required' and type options can be guessed, and are not provided in the options argument, the guessed value is used.

Parameters

string $class
string $property
mixed $data
array $options

Return Value

FormBuilderInterface

Exceptions

InvalidOptionsException if any given option is not applicable to the form type