Symfony\Component\Form\FormFactoryInterface::createBuilderForProperty
Returns a form builder for a property of a class.
If any of the 'max_length', 'required' and type options can be guessed, and are not provided in the options argument, the guessed value is used.
Signature
public function createBuilderForProperty(string
$class,
[string
$property = null,
[mixed
$data = null,
array
$options]] )
Parameters
$class
— string- The fully qualified class name
$property
— string- The name of the property to guess for
$data
— mixed- The initial data
$options
— array- The options for the builder
Returns
- FormBuilderInterface
- The form builder named after the property
Errors/Exceptions
-
InvalidOptionsException
- if any given option is not applicable to the form type