trait FormTrait

Form trait.

Methods

FormBuilder
form(mixed $data = null, array $options = array(), string|FormTypeInterface $type = null)

Creates and returns a form builder instance.

FormBuilder
namedForm(string $name, mixed $data = null, array $options = array(), string|FormTypeInterface $type = null)

Creates and returns a named form builder instance.

Details

at line 36
FormBuilder form(mixed $data = null, array $options = array(), string|FormTypeInterface $type = null)

Creates and returns a form builder instance.

Parameters

mixed $data The initial data for the form
array $options Options for the form
string|FormTypeInterface $type Type of the form

Return Value

FormBuilder

at line 51
FormBuilder namedForm(string $name, mixed $data = null, array $options = array(), string|FormTypeInterface $type = null)

Creates and returns a named form builder instance.

Parameters

string $name
mixed $data The initial data for the form
array $options Options for the form
string|FormTypeInterface $type Type of the form

Return Value

FormBuilder