FormFactoryInterface

interface FormFactoryInterface Methods 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 = ar

FormFactoryInterface::create()

FormInterface create(string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array()) Returns a form. Parameters string $type The type of the form mixed $data The initial data array $options The options Return Value FormInterface The form named after the type Exceptions InvalidOptionsException if any given option is not applicable to the given type See also createBuilder()

FormFactoryInterface::createBuilderForProperty()

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. Parameters string $class The fully qualified class name string $property The name of the property to guess for mixed $data The initial data array $options The options for the

FormFactoryInterface::createBuilder()

FormBuilderInterface createBuilder(string $type = 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType', mixed $data = null, array $options = array()) Returns a form builder. Parameters string $type The type of the form mixed $data The initial data array $options The options Return Value FormBuilderInterface The form builder Exceptions InvalidOptionsException if any given option is not applicable to the given type

FormFactoryBuilderInterface::setResolvedTypeFactory()

FormFactoryBuilderInterface setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory) Sets the factory for creating ResolvedFormTypeInterface instances. Parameters ResolvedFormTypeFactoryInterface $resolvedTypeFactory Return Value FormFactoryBuilderInterface The builder

FormFactoryBuilderInterface::getFormFactory()

FormFactoryInterface getFormFactory() Builds and returns the factory. Return Value FormFactoryInterface The form factory

FormFactoryBuilderInterface::addTypes()

FormFactoryBuilderInterface addTypes(array $types) Adds a list of form types to the factory. Parameters array $types The form types Return Value FormFactoryBuilderInterface The builder

FormFactoryBuilderInterface::addType()

FormFactoryBuilderInterface addType(FormTypeInterface $type) Adds a form type to the factory. Parameters FormTypeInterface $type The form type Return Value FormFactoryBuilderInterface The builder

FormFactoryBuilderInterface::addTypeExtensions()

FormFactoryBuilderInterface addTypeExtensions(array $typeExtensions) Adds a list of form type extensions to the factory. Parameters array $typeExtensions The form type extensions Return Value FormFactoryBuilderInterface The builder

FormFactoryBuilderInterface::addTypeGuesser()

FormFactoryBuilderInterface addTypeGuesser(FormTypeGuesserInterface $typeGuesser) Adds a type guesser to the factory. Parameters FormTypeGuesserInterface $typeGuesser The type guesser Return Value FormFactoryBuilderInterface The builder