mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
Compiler: added 'initial_state_path'
SVN:trunk[2209]
This commit is contained in:
@@ -739,6 +739,17 @@ EOF;
|
|||||||
{
|
{
|
||||||
$sState = $oState->getAttribute('id');
|
$sState = $oState->getAttribute('id');
|
||||||
|
|
||||||
|
$oInitialStatePath = $oState->GetOptionalElement('initial_state_path');
|
||||||
|
if ($oInitialStatePath)
|
||||||
|
{
|
||||||
|
$aInitialStatePath = array();
|
||||||
|
foreach ($oInitialStatePath->getElementsByTagName('state_ref') as $oIntermediateState)
|
||||||
|
{
|
||||||
|
$aInitialStatePath[] = "'".$oIntermediateState->GetText()."'";
|
||||||
|
}
|
||||||
|
$sInitialStatePath = 'Array('.implode(', ', $aInitialStatePath).')';
|
||||||
|
}
|
||||||
|
|
||||||
$sLifecycle .= " MetaModel::Init_DefineState(\n";
|
$sLifecycle .= " MetaModel::Init_DefineState(\n";
|
||||||
$sLifecycle .= " \"".$sState."\",\n";
|
$sLifecycle .= " \"".$sState."\",\n";
|
||||||
$sLifecycle .= " array(\n";
|
$sLifecycle .= " array(\n";
|
||||||
@@ -757,6 +768,10 @@ EOF;
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sLifecycle .= " ),\n";
|
$sLifecycle .= " ),\n";
|
||||||
|
if (isset($sInitialStatePath))
|
||||||
|
{
|
||||||
|
$sLifecycle .= " \"initial_state_path\" => $sInitialStatePath,\n";
|
||||||
|
}
|
||||||
$sLifecycle .= " )\n";
|
$sLifecycle .= " )\n";
|
||||||
$sLifecycle .= " );\n";
|
$sLifecycle .= " );\n";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user