diff --git a/sources/Forms/Block/AbstractFormBlock.php b/sources/Forms/Block/AbstractFormBlock.php new file mode 100644 index 000000000..44e777043 --- /dev/null +++ b/sources/Forms/Block/AbstractFormBlock.php @@ -0,0 +1,57 @@ +aOptions = $aOptions; + } + + public function GetOptions(): array + { + return $this->aOptions; + } + + public function AddSubFormBlock(AbstractFormBlock $oSubFormBlock): void + { + $this->aSubFormBlocks[] = $oSubFormBlock; + } + + public function GetSubFormBlocks(): array + { + return $this->aSubFormBlocks; + } + + public function AddInput(FormInput $oFormInput): void + { + $this->aFormInputs[$oFormInput->GetName()] = $oFormInput; + } + + public function GetInput(string $sName): FormInput + { + return $this->aFormInputs[$sName]; + } + + public function AddOutput(FormOutput $oFormOutput): void + { + $this->aFormOutputs[$oFormOutput->GetName()] = $oFormOutput; + } + + public function GetOutput(string $sName): FormOutput + { + return $this->aFormOutputs[$sName]; + } + + +} \ No newline at end of file diff --git a/sources/Forms/Block/Base/ChoiceFormBlock.php b/sources/Forms/Block/Base/ChoiceFormBlock.php new file mode 100644 index 000000000..869fc0714 --- /dev/null +++ b/sources/Forms/Block/Base/ChoiceFormBlock.php @@ -0,0 +1,16 @@ +AddInput(new FormInput('class_name', 'string')); + } + + +} \ No newline at end of file diff --git a/sources/Forms/Block/DataModel/OqlFormBlock.php b/sources/Forms/Block/DataModel/OqlFormBlock.php new file mode 100644 index 000000000..41be01dc1 --- /dev/null +++ b/sources/Forms/Block/DataModel/OqlFormBlock.php @@ -0,0 +1,21 @@ +AddOutput(new FormOutput('selected_class', 'string')); + } + + + +} \ No newline at end of file diff --git a/sources/Forms/Block/FormBlock.php b/sources/Forms/Block/FormBlock.php new file mode 100644 index 000000000..f2bfd2f76 --- /dev/null +++ b/sources/Forms/Block/FormBlock.php @@ -0,0 +1,10 @@ +sName = $sName; + $this->sType = $sName; + } + + public function GetName(): string + { + return $this->sName; + } + + public function SetName(string $sName): void + { + $this->sName = $sName; + } + + public function GetType(): string + { + return $this->sType; + } + + public function SetType(string $sType): void + { + $this->sType = $sType; + } +} \ No newline at end of file diff --git a/sources/Forms/Block/FormOutput.php b/sources/Forms/Block/FormOutput.php new file mode 100644 index 000000000..cb75ec696 --- /dev/null +++ b/sources/Forms/Block/FormOutput.php @@ -0,0 +1,48 @@ +sName = $sName; + $this->sType = $sName; + $this->oConverter = $oConverter; + } + + public function GetName(): string + { + return $this->sName; + } + + public function SetName(string $sName): void + { + $this->sName = $sName; + } + + public function GetType(): string + { + return $this->sType; + } + + public function SetType(string $sType): void + { + $this->sType = $sType; + } + + public function GetOutputValue(mixed $oData): mixed + { + $this->oConverter->Convert($oData); + } + + +} \ No newline at end of file diff --git a/sources/Forms/Converter/AbstractConverter.php b/sources/Forms/Converter/AbstractConverter.php new file mode 100644 index 000000000..1f28571c6 --- /dev/null +++ b/sources/Forms/Converter/AbstractConverter.php @@ -0,0 +1,8 @@ +