DataCollectorExtension
extends AbstractExtension
in package
Extension for collecting data of the forms on a page.
Tags
Table of Contents
- $dataCollector : mixed
- $typeExtensions : array<string|int, array<string|int, FormTypeExtensionInterface>>
- The type extensions provided by this extension.
- $typeGuesser : FormTypeGuesserInterface|null
- The type guesser provided by this extension.
- $typeGuesserLoaded : bool
- Whether the type guesser has been loaded.
- $types : array<string|int, FormTypeInterface>
- The types provided by this extension.
- __construct() : mixed
- getType() : FormTypeInterface
- Returns a type by name.
- getTypeExtensions() : array<string|int, FormTypeExtensionInterface>
- Returns the extensions for the given type.
- getTypeGuesser() : FormTypeGuesserInterface|null
- Returns the type guesser provided by this extension.
- hasType() : bool
- Returns whether the given type is supported.
- hasTypeExtensions() : bool
- Returns whether this extension provides type extensions for the given type.
- loadTypeExtensions() : array<string|int, FormTypeExtensionInterface>
- Registers the type extensions.
- loadTypeGuesser() : FormTypeGuesserInterface|null
- Registers the type guesser.
- loadTypes() : array<string|int, FormTypeInterface>
- Registers the types.
- initTypeExtensions() : mixed
- Initializes the type extensions.
- initTypeGuesser() : mixed
- Initializes the type guesser.
- initTypes() : mixed
- Initializes the types.
Properties
$dataCollector
private
mixed
$dataCollector
$typeExtensions
The type extensions provided by this extension.
private
array<string|int, array<string|int, FormTypeExtensionInterface>>
$typeExtensions
$typeGuesser
The type guesser provided by this extension.
private
FormTypeGuesserInterface|null
$typeGuesser
$typeGuesserLoaded
Whether the type guesser has been loaded.
private
bool
$typeGuesserLoaded
= false
$types
The types provided by this extension.
private
array<string|int, FormTypeInterface>
$types
Methods
__construct()
public
__construct(FormDataCollectorInterface $dataCollector) : mixed
Parameters
- $dataCollector : FormDataCollectorInterface
Return values
mixed —getType()
Returns a type by name.
public
getType(mixed $name) : FormTypeInterface
Parameters
- $name : mixed
-
The name of the type
Return values
FormTypeInterface —The type
getTypeExtensions()
Returns the extensions for the given type.
public
getTypeExtensions(mixed $name) : array<string|int, FormTypeExtensionInterface>
Parameters
- $name : mixed
-
The name of the type
Return values
array<string|int, FormTypeExtensionInterface> —An array of extensions as FormTypeExtensionInterface instances
getTypeGuesser()
Returns the type guesser provided by this extension.
public
getTypeGuesser() : FormTypeGuesserInterface|null
Return values
FormTypeGuesserInterface|null —The type guesser
hasType()
Returns whether the given type is supported.
public
hasType(mixed $name) : bool
Parameters
- $name : mixed
-
The name of the type
Return values
bool —Whether the type is supported by this extension
hasTypeExtensions()
Returns whether this extension provides type extensions for the given type.
public
hasTypeExtensions(mixed $name) : bool
Parameters
- $name : mixed
-
The name of the type
Return values
bool —Whether the given type has extensions
loadTypeExtensions()
Registers the type extensions.
protected
loadTypeExtensions() : array<string|int, FormTypeExtensionInterface>
Return values
array<string|int, FormTypeExtensionInterface> —An array of FormTypeExtensionInterface instances
loadTypeGuesser()
Registers the type guesser.
protected
loadTypeGuesser() : FormTypeGuesserInterface|null
Return values
FormTypeGuesserInterface|null —loadTypes()
Registers the types.
protected
loadTypes() : array<string|int, FormTypeInterface>
Return values
array<string|int, FormTypeInterface> —An array of FormTypeInterface instances
initTypeExtensions()
Initializes the type extensions.
private
initTypeExtensions() : mixed
Tags
Return values
mixed —initTypeGuesser()
Initializes the type guesser.
private
initTypeGuesser() : mixed
Tags
Return values
mixed —initTypes()
Initializes the types.
private
initTypes() : mixed