class FormFieldRegistry

This is an internal class that must not be used directly.

Methods

add(FormField $field)

Adds a field to the registry.

remove(string $name)

Removes a field and its children from the registry.

mixed
get(string $name)

Returns the value of the field and its children.

bool
has(string $name)

Tests whether the form has the given field.

set(string $name, mixed $value)

Set the value of a field and its children.

all()

Returns the list of field with their value.

Details

at line 30
add(FormField $field)

Adds a field to the registry.

Parameters

FormField $field

at line 54
remove(string $name)

Removes a field and its children from the registry.

Parameters

string $name The fully qualified name of the base field

at line 77
mixed get(string $name)

Returns the value of the field and its children.

Parameters

string $name The fully qualified name of the field

Return Value

mixed The value of the field

Exceptions

InvalidArgumentException if the field does not exist

at line 99
bool has(string $name)

Tests whether the form has the given field.

Parameters

string $name The fully qualified name of the field

Return Value

bool Whether the form has the given field

at line 118
set(string $name, mixed $value)

Set the value of a field and its children.

Parameters

string $name The fully qualified name of the field
mixed $value The value

Exceptions

InvalidArgumentException if the field does not exist

at line 138
FormField[] all()

Returns the list of field with their value.

Return Value

FormField[] The list of fields as [string] Fully qualified name => (mixed) value)