PM-4170: Importing a simplified designer process looses its type

This commit is contained in:
marcelo.cuiza
2015-11-30 17:00:15 -04:00
parent 0320db6c27
commit ee601563fd
4 changed files with 94 additions and 4 deletions

View File

@@ -103,6 +103,7 @@ class PMPluginRegistry
private $_aCronFiles = array ();
private $_arrayDesignerMenu = array();
private $_aMenuOptionsToReplace = array ();
private $_aImportProcessCallbackFile = array ();
/**
* Registry a plugin javascript to include with js core at same runtime
@@ -409,6 +410,10 @@ class PMPluginRegistry
unset( $this->_aMenuOptionsToReplace );
}
if(sizeof( $this->_aImportProcessCallbackFile )){
unset( $this->_aImportProcessCallbackFile );
}
//unregistering javascripts from this plugin
$this->unregisterJavascripts( $sNamespace );
//unregistering rest services from this plugin
@@ -1702,5 +1707,43 @@ class PMPluginRegistry
}
}
}
/**
* Register a callBackFile in the singleton
*
* @param unknown_type $namespace
*
* @param string $callBackFile
*
* @return void
*/
public function registerImportProcessCallback ($namespace, $callBackFile)
{
try {
$found = false;
foreach ($this->_aImportProcessCallbackFile as $row => $detail) {
if ($callBackFile == $detail->callBackFile && $namespace == $detail->namespace) {
$detail->callBackFile = $callBackFile;
$found = true;
}
}
if (!$found) {
$callBackFile = new importCallBack( $namespace, $callBackFile );
$this->_aImportProcessCallbackFile[] = $callBackFile;
}
} catch(Excepton $e) {
throw $e;
}
}
/**
* Return all callBackFiles registered
*
* @return array
*/
public function getImportProcessCallback()
{
return $this->_aImportProcessCallbackFile;
}
}