# ivyforms/0.6/backend/src/ValueObjects/Field/DateFieldGeneralSettings.php

The Innovative Form Builder – IvyForms, version 0.6. 131 lines.

- Page: https://pluginprobe.com/plugins/ivyforms/0.6/code/backend/src/ValueObjects/Field/DateFieldGeneralSettings.php
- Raw: https://pluginprobe.com/plugins/ivyforms/0.6/raw/backend/src/ValueObjects/Field/DateFieldGeneralSettings.php
- Modified: 2025-11-19T18:42:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ivyforms/0.6/code/backend/src/ValueObjects/Field/DateFieldGeneralSettings.php#L10-L20`.

```php
<?php

/**
 * @copyright © TMS-Plugins. All rights reserved.
 * @licence   See LICENCE.md for license details.
 */

namespace IvyForms\ValueObjects\Field;

// phpcs:disable PSR1.Files.SideEffects
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}

/**
 * Class DateFieldGeneralSettings
 *
 * Encapsulates date-specific settings extracted from FieldGeneralSettings.
 */
final class DateFieldGeneralSettings
{
    /**
     * @var string
     */
    private string $dateFieldType;

    /**
     * @var string
     */
    private string $dateFormat;

    /**
     * @var string|null
     */
    private ?string $minDateValue;

    /**
     * @var string|null
     */
    private ?string $maxDateValue;

    public function __construct(
        string $dateFieldType = '',
        string $dateFormat = '',
        ?string $minDateValue = null,
        ?string $maxDateValue = null
    ) {
        $this->dateFieldType = $dateFieldType;
        $this->dateFormat = $dateFormat;
        $this->minDateValue = $minDateValue;
        $this->maxDateValue = $maxDateValue;
    }

    /**
     * Get dateFieldType.
     */
    public function getDateFieldType(): string
    {
        return $this->dateFieldType;
    }

    /**
     * Set dateFieldType.
     */
    public function setDateFieldType(string $dateFieldType): void
    {
        $this->dateFieldType = $dateFieldType;
    }

    /**
     * Get dateFormat.
     */
    public function getDateFormat(): string
    {
        return $this->dateFormat;
    }

    /**
     * Set dateFormat.
     */
    public function setDateFormat(string $dateFormat): void
    {
        $this->dateFormat = $dateFormat;
    }

    /**
     * Get minDateValue.
     */
    public function getMinDateValue(): ?string
    {
        return $this->minDateValue;
    }

    /**
     * Set minDateValue.
     */
    public function setMinDateValue(?string $minDateValue): void
    {
        $this->minDateValue = $minDateValue;
    }

    /**
     * Get maxDateValue.
     */
    public function getMaxDateValue(): ?string
    {
        return $this->maxDateValue;
    }

    /**
     * Set maxDateValue.
     */
    public function setMaxDateValue(?string $maxDateValue): void
    {
        $this->maxDateValue = $maxDateValue;
    }

    /**
     * @return array<string, string|null>
     */
    public function toArray(): array
    {
        return [
            'dateFieldType' => $this->getDateFieldType(),
            'dateFormat'    => $this->getDateFormat(),
            'minDateValue'  => $this->getMinDateValue(),
            'maxDateValue'  => $this->getMaxDateValue(),
        ];
    }
}

```
