<?php namespace domain\Setting\SettingDetails; class AbstractSettingDetail { public string $name; public string $label; public string $type; public string $section; public ?string $formType = null; public array $options = []; public $defaultValue = null; public ?string $subSection = null; public ?string $helpMessage = null; public function setName(string $name): self { $this->name = $name; return $this; } public function getName(): string { return $this->name; } public function setLabel(string $label): self { $this->label = $label; return $this; } public function getLabel(): string { return $this->label; } public function setSection(string $section): self { $this->section = $section; return $this; } public function getSection(): string { return $this->section; } public function setSubSection(string $subSection): self { $this->subSection = $subSection; return $this; } public function getSubSection(): ?string { return $this->subSection; } public function setHelpMessage(string $helpMessage): self { $this->helpMessage = $helpMessage; return $this; } public function getHelpMessage(): ?string { return $this->helpMessage; } public function getFormType(): ?string { return $this->formType; } public function setFormTypeInput(): self { $this->formType = 'input'; return $this; } public function setFormTypeTextarea(): self { $this->formType = 'textarea'; return $this; } public function setFormTypeCheckbox(): self { $this->formType = 'checkbox'; return $this; } public function setFormTypeToggle(): self { $this->formType = 'toggle'; return $this; } public function setFormTypeSelect(array $options): self { $this->formType = 'select'; $this->options = $options; return $this; } public function getOptions(): array { return $this->options; } public function setDefaultValue($defaultValue): self { $this->defaultValue = $defaultValue; return $this; } public function getDefaultValue() { return $this->defaultValue; } public function setTypeString(): self { $this->type = 'string'; return $this; } public function setTypeText(): self { $this->type = 'text'; return $this; } public function setTypeBoolean(): self { $this->type = 'boolean'; return $this; } public function setTypeDate(): self { $this->type = 'date'; return $this; } public function setTypeInteger(): self { $this->type = 'integer'; return $this; } public function setTypeFloat(): self { $this->type = 'float'; return $this; } public function setTypeDouble(): self { $this->type = 'double'; return $this; } public function getType(): string { return $this->type; } }