FormFactoryBuilder
in package
implements
FormFactoryBuilderInterface
The default implementation of FormFactoryBuilderInterface.
Tags
Table of Contents
Interfaces
- FormFactoryBuilderInterface
- A builder for FormFactoryInterface objects.
Properties
- $extensions : array<string|int, FormExtensionInterface>
- $forceCoreExtension : bool
- $resolvedTypeFactory : mixed
- $typeExtensions : array<string|int, array<string|int, FormTypeExtensionInterface>>
- $typeGuessers : array<string|int, FormTypeGuesserInterface>
- $types : array<string|int, FormTypeInterface>
Methods
- __construct() : mixed
- addExtension() : $this
- Adds an extension to be loaded by the factory.
- addExtensions() : $this
- Adds a list of extensions to be loaded by the factory.
- addType() : $this
- Adds a form type to the factory.
- addTypeExtension() : $this
- Adds a form type extension to the factory.
- addTypeExtensions() : $this
- Adds a list of form type extensions to the factory.
- addTypeGuesser() : $this
- Adds a type guesser to the factory.
- addTypeGuessers() : $this
- Adds a list of type guessers to the factory.
- addTypes() : $this
- Adds a list of form types to the factory.
- getFormFactory() : FormFactoryInterface
- Builds and returns the factory.
- setResolvedTypeFactory() : $this
- Sets the factory for creating ResolvedFormTypeInterface instances.
Properties
$extensions
private
array<string|int, FormExtensionInterface>
$extensions
= []
$forceCoreExtension
private
bool
$forceCoreExtension
$resolvedTypeFactory
private
mixed
$resolvedTypeFactory
$typeExtensions
private
array<string|int, array<string|int, FormTypeExtensionInterface>>
$typeExtensions
= []
$typeGuessers
private
array<string|int, FormTypeGuesserInterface>
$typeGuessers
= []
$types
private
array<string|int, FormTypeInterface>
$types
= []
Methods
__construct()
public
__construct([bool $forceCoreExtension = false ]) : mixed
Parameters
- $forceCoreExtension : bool = false
addExtension()
Adds an extension to be loaded by the factory.
public
addExtension(FormExtensionInterface $extension) : $this
Parameters
- $extension : FormExtensionInterface
Return values
$thisaddExtensions()
Adds a list of extensions to be loaded by the factory.
public
addExtensions(array<string|int, mixed> $extensions) : $this
Parameters
- $extensions : array<string|int, mixed>
-
The extensions
Return values
$thisaddType()
Adds a form type to the factory.
public
addType(FormTypeInterface $type) : $this
Parameters
- $type : FormTypeInterface
Return values
$thisaddTypeExtension()
Adds a form type extension to the factory.
public
addTypeExtension(FormTypeExtensionInterface $typeExtension) : $this
Parameters
- $typeExtension : FormTypeExtensionInterface
Return values
$thisaddTypeExtensions()
Adds a list of form type extensions to the factory.
public
addTypeExtensions(array<string|int, mixed> $typeExtensions) : $this
Parameters
- $typeExtensions : array<string|int, mixed>
-
The form type extensions
Return values
$thisaddTypeGuesser()
Adds a type guesser to the factory.
public
addTypeGuesser(FormTypeGuesserInterface $typeGuesser) : $this
Parameters
- $typeGuesser : FormTypeGuesserInterface
Return values
$thisaddTypeGuessers()
Adds a list of type guessers to the factory.
public
addTypeGuessers(array<string|int, mixed> $typeGuessers) : $this
Parameters
- $typeGuessers : array<string|int, mixed>
-
The type guessers
Return values
$thisaddTypes()
Adds a list of form types to the factory.
public
addTypes(array<string|int, mixed> $types) : $this
Parameters
- $types : array<string|int, mixed>
-
The form types
Return values
$thisgetFormFactory()
Builds and returns the factory.
public
getFormFactory() : FormFactoryInterface
Return values
FormFactoryInterfacesetResolvedTypeFactory()
Sets the factory for creating ResolvedFormTypeInterface instances.
public
setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory) : $this
Parameters
- $resolvedTypeFactory : ResolvedFormTypeFactoryInterface