mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
Compiler and co: implicit naming and reconciliation scheme
SVN:trunk[1985]
This commit is contained in:
@@ -386,7 +386,8 @@ EOF;
|
||||
$aClassParams['category'] = $this->GetPropString($oProperties, 'category', '');
|
||||
$aClassParams['key_type'] = "'autoincrement'";
|
||||
|
||||
$oNaming = $oProperties->GetUniqueElement('naming');
|
||||
if ($oNaming = $oProperties->GetOptionalElement('naming'))
|
||||
{
|
||||
$oNameAttributes = $oNaming->GetUniqueElement('attributes');
|
||||
$oAttributes = $oNameAttributes->getElementsByTagName('attribute');
|
||||
$aNameAttCodes = array();
|
||||
@@ -408,6 +409,11 @@ EOF;
|
||||
{
|
||||
$sNameAttCode = "''";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sNameAttCode = "''";
|
||||
}
|
||||
$aClassParams['name_attcode'] = $sNameAttCode;
|
||||
|
||||
$oLifecycle = $oClass->GetOptionalElement('lifecycle');
|
||||
@@ -421,7 +427,8 @@ EOF;
|
||||
}
|
||||
$aClassParams['state_attcode'] = "'$sStateAttCode'";
|
||||
|
||||
$oReconciliation = $oProperties->GetUniqueElement('reconciliation');
|
||||
if ($oReconciliation = $oProperties->GetOptionalElement('reconciliation'))
|
||||
{
|
||||
$oReconcAttributes = $oReconciliation->getElementsByTagName('attribute');
|
||||
$aReconcAttCodes = array();
|
||||
foreach($oReconcAttributes as $oAttribute)
|
||||
@@ -429,6 +436,11 @@ EOF;
|
||||
$aReconcAttCodes[] = $oAttribute->getAttribute('id');
|
||||
}
|
||||
$sReconcKeys = "array('".implode("', '", $aReconcAttCodes)."')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sReconcKeys = "array()";
|
||||
}
|
||||
$aClassParams['reconc_keys'] = $sReconcKeys;
|
||||
|
||||
$aClassParams['db_table'] = $this->GetPropString($oProperties, 'db_table', '');
|
||||
|
||||
Reference in New Issue
Block a user