mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 22:48:45 +02:00
N°8772 - Compiler: add static inputs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user