FormFactoryBuilder
in package
implements
FormFactoryBuilderInterface
The default implementation of FormFactoryBuilderInterface.
Tags
Interfaces, Classes, Traits and Enums
- FormFactoryBuilderInterface
- A builder for FormFactoryInterface objects.
Table of Contents
- $extensions : array<string|int, FormExtensionInterface>
- $forceCoreExtension : mixed
- $resolvedTypeFactory : ResolvedFormTypeFactoryInterface
- $typeExtensions : array<string|int, array<string|int, FormTypeExtensionInterface>>
- $typeGuessers : array<string|int, FormTypeGuesserInterface>
- $types : array<string|int, FormTypeInterface>
- __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
mixed
$forceCoreExtension
$resolvedTypeFactory
private
ResolvedFormTypeFactoryInterface
$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
Return values
mixed —addExtension()
Adds an extension to be loaded by the factory.
public
addExtension(FormExtensionInterface $extension) : $this
Parameters
- $extension : FormExtensionInterface
Return values
$this —addExtensions()
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
$this —addType()
Adds a form type to the factory.
public
addType(FormTypeInterface $type) : $this
Parameters
- $type : FormTypeInterface
Return values
$this —addTypeExtension()
Adds a form type extension to the factory.
public
addTypeExtension(FormTypeExtensionInterface $typeExtension) : $this
Parameters
- $typeExtension : FormTypeExtensionInterface
Return values
$this —addTypeExtensions()
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
$this —addTypeGuesser()
Adds a type guesser to the factory.
public
addTypeGuesser(FormTypeGuesserInterface $typeGuesser) : $this
Parameters
- $typeGuesser : FormTypeGuesserInterface
Return values
$this —addTypeGuessers()
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
$this —addTypes()
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
$this —getFormFactory()
Builds and returns the factory.
public
getFormFactory() : FormFactoryInterface
Return values
FormFactoryInterface —The form factory
setResolvedTypeFactory()
Sets the factory for creating ResolvedFormTypeInterface instances.
public
setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory) : $this
Parameters
- $resolvedTypeFactory : ResolvedFormTypeFactoryInterface