class DateMetadataField extends MetadataField

Represents a structured metadata field with 'Date' type.

Methods

__construct(string $label)

The DateMetadataField constructor.

setDefaultValue(mixed $defaultValue)

Sets the default date for this field.

getDefaultValue()

Gets the default date of this field.

Details

__construct(string $label)

The DateMetadataField constructor.

Parameters

Name Type Description
$label string

void setDefaultValue(mixed $defaultValue)

Sets the default date for this field.

Parameters

Name Type Description
$defaultValue mixed The date to set.

Return Value

void

DateTime|null getDefaultValue()

Gets the default date of this field.

Return Value

DateTime|null

Exceptions

Exception When the underlying value is malformed.