FormRegistry
in package
implements
FormRegistryInterface
The central registry of the Form component.
Tags
Interfaces, Classes, Traits and Enums
- FormRegistryInterface
- The central registry of the Form component.
Table of Contents
- $checkedTypes : mixed
- $extensions : array<string|int, FormExtensionInterface>
- $guesser : FormTypeGuesserInterface|false|null
- $resolvedTypeFactory : ResolvedFormTypeFactoryInterface
- $types : array<string|int, ResolvedFormTypeInterface>
- __construct() : mixed
- getExtensions() : array<string|int, FormExtensionInterface>
- Returns the extensions loaded by the framework.
- getType() : ResolvedFormTypeInterface
- Returns a form type by name.
- getTypeGuesser() : FormTypeGuesserInterface|null
- Returns the guesser responsible for guessing types.
- hasType() : bool
- Returns whether the given form type is supported.
- resolveType() : ResolvedFormTypeInterface
- Wraps a type into a ResolvedFormTypeInterface implementation and connects it with its parent type.
Properties
$checkedTypes
private
mixed
$checkedTypes
= []
$extensions
private
array<string|int, FormExtensionInterface>
$extensions
= []
$guesser
private
FormTypeGuesserInterface|false|null
$guesser
= false
$resolvedTypeFactory
private
ResolvedFormTypeFactoryInterface
$resolvedTypeFactory
$types
private
array<string|int, ResolvedFormTypeInterface>
$types
= []
Methods
__construct()
public
__construct(array<string|int, FormExtensionInterface> $extensions, ResolvedFormTypeFactoryInterface $resolvedTypeFactory) : mixed
Parameters
- $extensions : array<string|int, FormExtensionInterface>
- $resolvedTypeFactory : ResolvedFormTypeFactoryInterface
Tags
Return values
mixed —getExtensions()
Returns the extensions loaded by the framework.
public
getExtensions() : array<string|int, FormExtensionInterface>
Return values
array<string|int, FormExtensionInterface> —getType()
Returns a form type by name.
public
getType(mixed $name) : ResolvedFormTypeInterface
Parameters
- $name : mixed
-
The name of the type
Return values
ResolvedFormTypeInterface —The type
getTypeGuesser()
Returns the guesser responsible for guessing types.
public
getTypeGuesser() : FormTypeGuesserInterface|null
Return values
FormTypeGuesserInterface|null —hasType()
Returns whether the given form type is supported.
public
hasType(mixed $name) : bool
Parameters
- $name : mixed
-
The name of the type
Return values
bool —Whether the type is supported
resolveType()
Wraps a type into a ResolvedFormTypeInterface implementation and connects it with its parent type.
private
resolveType(FormTypeInterface $type) : ResolvedFormTypeInterface
Parameters
- $type : FormTypeInterface