abstract class MetadataFieldList extends MetadataField

Represents a structured metadata list field.

Methods

jsonSerialize()

No description

__construct(string $label, array|MetadataDataSource $dataSource = [])

The MetadataFieldList constructor.

getPropertyKeys()

Gets the keys for all the properties of this object.

getType()

Returns the type of this field.

getDefaultValue()

Gets the default value of this field.

setDefaultValue(mixed $defaultValue)

Sets the default value of this field.

getExternalId()

Gets the ID of this field.

setExternalId(string $externalId)

Sets the ID of the string (auto-generated if this is left blank).

getLabel()

Gets the label of this field.

setLabel(string $label)

Sets the label of this field.

getMandatory()

Gets a boolean indicating whether this fields is currently mandatory.

setMandatory(bool $mandatory)

Sets whether this field needs to be mandatory.

getValidation()

Gets the validation rules of this field.

setValidation(MetadataValidation $validation)

Sets the validation rules of this field.

getDataSource()

Gets the data source of this field.

setDataSource(array|MetadataDataSource $metadataDataSource)

Sets the data source for this field.

Details

jsonSerialize()

__construct(string $label, array|MetadataDataSource $dataSource = [])

The MetadataFieldList constructor.

Parameters

Name Type Description
$label string
$dataSource array|MetadataDataSource

string[] getPropertyKeys()

Gets the keys for all the properties of this object.

Return Value

string[]

string getType()

Returns the type of this field.

Return Value

string The type name.

mixed getDefaultValue()

Gets the default value of this field.

Return Value

mixed

setDefaultValue(mixed $defaultValue)

Sets the default value of this field.

Parameters

Name Type Description
$defaultValue mixed

string getExternalId()

Gets the ID of this field.

Return Value

string The field ID.

setExternalId(string $externalId)

Sets the ID of the string (auto-generated if this is left blank).

Parameters

Name Type Description
$externalId string The ID to set.

string getLabel()

Gets the label of this field.

Return Value

string The label of the field.

setLabel(string $label)

Sets the label of this field.

Parameters

Name Type Description
$label string The label to set.

bool getMandatory()

Gets a boolean indicating whether this fields is currently mandatory.

Return Value

bool A boolean indicating whether the field is mandatory.

setMandatory(bool $mandatory)

Sets whether this field needs to be mandatory.

Parameters

Name Type Description
$mandatory bool A boolean indicating whether the field should be mandatory.

MetadataValidation getValidation()

Gets the validation rules of this field.

Return Value

MetadataValidation The validation rules.

setValidation(MetadataValidation $validation)

Sets the validation rules of this field.

Parameters

Name Type Description
$validation MetadataValidation The rules to set.

MetadataDataSource getDataSource()

Gets the data source of this field.

Return Value

MetadataDataSource The data source.

setDataSource(array|MetadataDataSource $metadataDataSource)

Sets the data source for this field.

Parameters

Name Type Description
$metadataDataSource array|MetadataDataSource The data source to set.

Exceptions

InvalidArgumentException