class DateMetadataField extends MetadataField

Represents a structured metadata field with 'Date' type.

Methods

jsonSerialize()

No description

__construct(string $label)

The DateMetadataField constructor.

getPropertyKeys()

Gets the keys for all the properties of this object.

getType()

Returns the type of this field.

getDefaultValue()

Gets the default date of this field.

setDefaultValue(mixed $defaultValue)

Sets the default date for 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.

Details

jsonSerialize()

__construct(string $label)

The DateMetadataField constructor.

Parameters

Name Type Description
$label string

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 date of this field.

Return Value

mixed

Exceptions

Exception When the underlying value is malformed.

setDefaultValue(mixed $defaultValue)

Sets the default date for 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.