FormFactory (Component\Form)
Symfony\Component\Form\FormFactory
class FormFactory implements FormFactoryInterface
Methods
__construct(FormRegistryInterface $registry, ResolvedFormTypeFactoryInterface $resolvedTypeFactory) | ||
FormInterface | create(string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array()) Returns a form. | |
FormInterface | createNamed(string|int $name, string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array()) Returns a form. | |
FormInterface | createForProperty(string $class, string $property, mixed $data = null, array $options = array()) Returns a form for a property of a class. | |
FormBuilderInterface | createBuilder(string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array()) Returns a form builder. | |
FormBuilderInterface | createNamedBuilder(string|int $name, string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array()) Returns a form builder. | |
FormBuilderInterface | createBuilderForProperty(string $class, string $property, mixed $data = null, array $options = array()) Returns a form builder for a property of a class. |
Details
public __construct(FormRegistryInterface $registry, ResolvedFormTypeFactoryInterface $resolvedTypeFactory)
public FormInterface create(string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array())
Returns a form.
public FormInterface createNamed(string|int $name, string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array())
Returns a form.
public FormInterface createForProperty(string $class, string $property, mixed $data = null, array $options = array())
Returns a form for a property of a class.
public FormBuilderInterface createBuilder(string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array())
Returns a form builder.
public FormBuilderInterface createNamedBuilder(string|int $name, string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array())
Returns a form builder.
public FormBuilderInterface createBuilderForProperty(string $class, string $property, mixed $data = null, array $options = array())
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.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Form/FormFactory.html