Class

Dat0r\Runtime\Field\Type\AggregateField

class AggregateField extends Field

AggregateField allows to nest multiple modules below a defined fieldname.

Pass in the 'OPTION_MODULES' option to define the modules you would like to nest. The corresponding value-structure is organized as a collection of documents.

Supported options: OPTION_MODULES

Constants

OPTION_MODULES

Option that holds an array of supported aggregate-module names.

Methods

static IField create(string $name, array $options = array())

Creates a new field instance.

from Field
__construct(string $name, array $options = array())

Constructs a new field instance.

from Field
string getName()

Returns the name of the field.

from Field
array getOptions()

Returns the field's options.

from Field
mixed getOption(string $name, mixed $default = null)

Returns a field option by name if it exists.

from Field
boolean hasOption(string $name)

Tells if a field currently owns a specific option.

from Field
mixed getDefaultValue()

Returns the default value of the field.

mixed getNullValue()

Returns a field's null value.

from Field
string getValidator()

from Field
IValueHolder createValueHolder()

Creates a IValueHolder instance dedicated to the current field instance.

from Field
array getAggregateModules()

Returns the aggregate-modules as an array.

Details

in Field at line 49
static public IField create(string $name, array $options = array())

Creates a new field instance.

Parameters

string $name
array $options

Return Value

IField

in Field at line 60
public __construct(string $name, array $options = array())

Constructs a new field instance.

Parameters

string $name
array $options

in Field at line 71
public string getName()

Returns the name of the field.

Return Value

string

in Field at line 81
public array getOptions()

Returns the field's options.

Return Value

array

in Field at line 95
public mixed getOption(string $name, mixed $default = null)

Returns a field option by name if it exists.

Otherwise an optional default is returned.

Parameters

string $name
mixed $default

Return Value

mixed

in Field at line 107
public boolean hasOption(string $name)

Tells if a field currently owns a specific option.

Parameters

string $name

Return Value

boolean

at line 37
public mixed getDefaultValue()

Returns the default value of the field.

Return Value

mixed

in Field at line 127
public mixed getNullValue()

Returns a field's null value.

Return Value

mixed

in Field at line 138
public string getValidator()

Return Value

string Fully qualified name of an IValidator implementation.

in Field at line 176
public IValueHolder createValueHolder()

Creates a IValueHolder instance dedicated to the current field instance.

Return Value

IValueHolder

at line 47
public array getAggregateModules()

Returns the aggregate-modules as an array.

Return Value

array