Symfony\Component\Form\FormFactoryInterface::createForProperty
Returns a form for a property of a class.
Signature
public function createForProperty(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
- FormInterface
- The form named after the property
Errors/Exceptions
-
InvalidOptionsException
- if any given option is not applicable to the form type