|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <?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;
- }
- }
|