class FormRegistry implements FormRegistryInterface
The central registry of the Form component.
__construct(array $extensions, ResolvedFormTypeFactoryInterface $resolvedTypeFactory) | ||
ResolvedFormTypeInterface | getType(string $name) Returns a form type by name. | |
bool | hasType(string $name) Returns whether the given form type is supported. | |
FormTypeGuesserInterface|null | getTypeGuesser() Returns the guesser responsible for guessing types. | |
FormExtensionInterface[] | getExtensions() Returns the extensions loaded by the framework. |
array | $extensions | An array of FormExtensionInterface |
ResolvedFormTypeFactoryInterface | $resolvedTypeFactory | The factory for resolved form types |
UnexpectedTypeException | if any extension does not implement FormExtensionInterface |
Returns a form type by name.
This methods registers the type extensions from the form extensions.
string | $name | The name of the type |
ResolvedFormTypeInterface | The type |
InvalidArgumentException | if the type can not be retrieved from any extension |
Returns whether the given form type is supported.
string | $name | The name of the type |
bool | Whether the type is supported |
Returns the guesser responsible for guessing types.
FormTypeGuesserInterface|null |
Returns the extensions loaded by the framework.
FormExtensionInterface[] |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Form/FormRegistry.html