4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Form
;
15 * A builder for FormFactoryInterface objects.
17 * @author Bernhard Schussek <bschussek@gmail.com>
19 interface FormFactoryBuilderInterface
22 * Sets the factory for creating ResolvedFormTypeInterface instances.
24 * @param ResolvedFormTypeFactoryInterface $resolvedTypeFactory
26 * @return FormFactoryBuilderInterface The builder.
28 public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface
$resolvedTypeFactory);
31 * Adds an extension to be loaded by the factory.
33 * @param FormExtensionInterface $extension The extension.
35 * @return FormFactoryBuilderInterface The builder.
37 public function addExtension(FormExtensionInterface
$extension);
40 * Adds a list of extensions to be loaded by the factory.
42 * @param array $extensions The extensions.
44 * @return FormFactoryBuilderInterface The builder.
46 public function addExtensions(array $extensions);
49 * Adds a form type to the factory.
51 * @param FormTypeInterface $type The form type.
53 * @return FormFactoryBuilderInterface The builder.
55 public function addType(FormTypeInterface
$type);
58 * Adds a list of form types to the factory.
60 * @param array $types The form types.
62 * @return FormFactoryBuilderInterface The builder.
64 public function addTypes(array $types);
67 * Adds a form type extension to the factory.
69 * @param FormTypeExtensionInterface $typeExtension The form type extension.
71 * @return FormFactoryBuilderInterface The builder.
73 public function addTypeExtension(FormTypeExtensionInterface
$typeExtension);
76 * Adds a list of form type extensions to the factory.
78 * @param array $typeExtensions The form type extensions.
80 * @return FormFactoryBuilderInterface The builder.
82 public function addTypeExtensions(array $typeExtensions);
85 * Adds a type guesser to the factory.
87 * @param FormTypeGuesserInterface $typeGuesser The type guesser.
89 * @return FormFactoryBuilderInterface The builder.
91 public function addTypeGuesser(FormTypeGuesserInterface
$typeGuesser);
94 * Adds a list of type guessers to the factory.
96 * @param array $typeGuessers The type guessers.
98 * @return FormFactoryBuilderInterface The builder.
100 public function addTypeGuessers(array $typeGuessers);
103 * Builds and returns the factory.
105 * @return FormFactoryInterface The form factory.
107 public function getFormFactory();