N°5218 Fix toolkit error on enum since 3.0.0 (#513)

This commit is contained in:
Thomas Casteleyn
2023-09-12 17:27:46 +02:00
committed by GitHub
parent d8ec900933
commit 3818bc3f98

View File

@@ -1807,11 +1807,10 @@ EOF;
throw new DOMFormatException("Non existing attribute '$sStateAttCode'", null, null, $oStateAttribute);
}
}
$oValues = $oField->GetUniqueElement('values');
$oValueNodes = $oValues->getElementsByTagName('value');
foreach ($oValueNodes as $oValue) {
$oCodeNodes = $this->oFactory->GetNodes('values/value/code', $oField);
foreach ($oCodeNodes as $oCode) {
$sLifecycle .= " MetaModel::Init_DefineState(\n";
$sLifecycle .= " \"".$oValue->GetText()."\",\n";
$sLifecycle .= " \"".$oCode->GetText()."\",\n";
$sLifecycle .= " array(\n";
$sLifecycle .= " \"attribute_inherit\" => '',\n";
$sLifecycle .= " \"attribute_list\" => array()\n";