10, 'style' => 'height: auto;' ]; return $aOptions; } /** @inheritdoc */ public function InitInputs(): void { parent::InitInputs(); $this->AddInput(new FormInput(self::INPUT_CLASS_NAME, ClassIOFormat::class)); $this->AddInput(new FormInput(self::INPUT_ATTRIBUTE, AttributeIOFormat::class)); } public function GetOptions(): array { $aOptions = parent::GetOptions(); $oBindingClassName = $this->GetInput(self::INPUT_CLASS_NAME)->GetBinding(); $oClassName = $oBindingClassName->oOutput->Value(); $oBindingAttribute = $this->GetInput(self::INPUT_ATTRIBUTE)->GetBinding(); $oAttribute = $oBindingAttribute->oOutput->Value(); $oAttDef = \MetaModel::GetAttributeDef(strval($oClassName), strval($oAttribute)); $aValues = $oAttDef->GetAllowedValues(); $aOptions['choices'] = array_flip($aValues); return $aOptions; } }