<?php namespace common\logic\Setting\SettingDetails; class AbstractSettingDetail { const TYPE_STRING = 'string'; const TYPE_TEXT = 'text'; const TYPE_BOOLEAN = 'boolean'; const TYPE_DATE = 'date'; const TYPE_INTEGER = 'integer'; const TYPE_FLOAT = 'float'; const TYPE_DOUBLE = 'double'; public string $name; public string $label; public string $type; public string $section; 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 setDefaultValue($defaultValue): self { $this->defaultValue = $defaultValue; return $this; } public function getDefaultValue() { return $this->defaultValue; } public function setTypeString(): self { $this->type = self::TYPE_STRING; return $this; } public function setTypeText(): self { $this->type = self::TYPE_TEXT; return $this; } public function setTypeBoolean(): self { $this->type = self::TYPE_BOOLEAN; return $this; } public function setTypeDate(): self { $this->type = self::TYPE_DATE; return $this; } public function setTypeInteger(): self { $this->type = self::TYPE_INTEGER; return $this; } public function setTypeFloat(): self { $this->type = self::TYPE_FLOAT; return $this; } public function setTypeDouble(): self { $this->type = self::TYPE_DOUBLE; return $this; } public function getType(): string { return $this->type; } }