. */ namespace SP\Domain\CustomField\Services; use JsonSerializable; use SP\Domain\Common\Dtos\Dto; /** * Class CustomFieldItem */ final class CustomFieldItem extends Dto implements JsonSerializable { public function __construct( public readonly bool $required, public readonly bool $showInList, public readonly string $help, public readonly int $definitionId, public readonly string $definitionName, public readonly int $typeId, public readonly string $typeName, public readonly string $typeText, public readonly int $moduleId, public readonly string $formId, public readonly mixed $value, public readonly bool $isEncrypted, public readonly bool $isValueEncrypted ) { } /** * @inheritDoc */ public function jsonSerialize(): array { return [ 'required' => $this->required, 'showInList' => $this->showInList, 'help' => $this->help, 'typeId' => $this->typeId, 'typeName' => $this->typeName, 'typeText' => $this->typeText, 'moduleId' => $this->moduleId, 'value' => $this->value, 'isEncrypted' => $this->isEncrypted, 'isValueEncrypted' => $this->isValueEncrypted, ]; } }