mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°8771 - Add Symfony form component to iTop core
- IO debug
This commit is contained in:
@@ -26,6 +26,7 @@ class AttributeValueChoiceFormBlock extends ChoiceFormBlock
|
||||
public function InitOptions(array &$aOptions = []): array
|
||||
{
|
||||
$aOptions['multiple'] = true;
|
||||
$aOptions['required'] = false;
|
||||
$aOptions['attr'] = [
|
||||
'size' => 10,
|
||||
'style' => 'height: auto;'
|
||||
@@ -42,14 +43,18 @@ class AttributeValueChoiceFormBlock extends ChoiceFormBlock
|
||||
$this->AddInput(new FormInput(self::INPUT_ATTRIBUTE, AttributeIOFormat::class));
|
||||
}
|
||||
|
||||
public function GetOptions(): array
|
||||
public function UpdateOptions(): array
|
||||
{
|
||||
$aOptions = parent::GetOptions();
|
||||
$aOptions = parent::UpdateOptions();
|
||||
|
||||
$oBindingClassName = $this->GetInput(self::INPUT_CLASS_NAME)->GetBinding();
|
||||
if($oBindingClassName->oOutput->Value() === null || $oBindingClassName->oOutput->Value() == "")
|
||||
return $aOptions;
|
||||
$oClassName = $oBindingClassName->oOutput->Value();
|
||||
|
||||
$oBindingAttribute = $this->GetInput(self::INPUT_ATTRIBUTE)->GetBinding();
|
||||
if($oBindingAttribute->oOutput->Value() === null || $oBindingAttribute->oOutput->Value() == "")
|
||||
return $aOptions;
|
||||
$oAttribute = $oBindingAttribute->oOutput->Value();
|
||||
|
||||
$oAttDef = \MetaModel::GetAttributeDef(strval($oClassName), strval($oAttribute));
|
||||
|
||||
Reference in New Issue
Block a user