N°8772 - Compiler: add static inputs

This commit is contained in:
Eric Espie
2025-12-10 17:53:31 +01:00
parent c40e7ab10e
commit 4d7183e067
6 changed files with 65 additions and 1 deletions

View File

@@ -31,10 +31,16 @@ class Property extends AbstractProperty
public function ToPHPFormBlock(&$aPHPFragments = []): string
{
$sFormBlockClass = $this->oValueType->GetFormBlockClass();
$sInputs = '';
foreach ($this->oValueType->GetInputs() as $sInput => $sValue) {
$sInputs .= "\n ->SetInputValue('$sInput', '$sValue')";
}
return <<<PHP
\$this->Add('$this->sId', '$sFormBlockClass', [
'label' => '$this->sLabel',
]);
]){$sInputs};
PHP;
}