HOR-2282
This commit is contained in:
@@ -105,6 +105,7 @@ class PMPluginRegistry
|
||||
private $_aMenuOptionsToReplace = array ();
|
||||
private $_aImportProcessCallbackFile = array ();
|
||||
private $_aOpenReassignCallback = array ();
|
||||
private $_arrayDesignerSourcePath = array();
|
||||
|
||||
/**
|
||||
* Registry a plugin javascript to include with js core at same runtime
|
||||
@@ -408,6 +409,12 @@ class PMPluginRegistry
|
||||
unset($this->_arrayDesignerMenu[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->_arrayDesignerSourcePath as $key => $detail) {
|
||||
if ($detail->pluginName == $sNamespace) {
|
||||
unset($this->_arrayDesignerSourcePath[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
if(sizeof( $this->_aMenuOptionsToReplace )){
|
||||
unset( $this->_aMenuOptionsToReplace );
|
||||
@@ -1849,4 +1856,50 @@ class PMPluginRegistry
|
||||
}
|
||||
return $enabledPlugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registry in an array routes for js or css files.
|
||||
* @param type $pluginName
|
||||
* @param type $pathFile
|
||||
* @throws Exception
|
||||
*/
|
||||
public function registerDesignerSourcePath($pluginName, $pathFile)
|
||||
{
|
||||
try {
|
||||
$flagFound = false;
|
||||
|
||||
foreach ($this->_arrayDesignerSourcePath as $value) {
|
||||
if ($value->pluginName == $pluginName && $value->pathFile == $pathFile) {
|
||||
$flagFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$flagFound) {
|
||||
$obj = new stdClass();
|
||||
$obj->pluginName = $pluginName;
|
||||
$obj->pathFile = $pathFile;
|
||||
|
||||
$this->_arrayDesignerSourcePath[] = $obj;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* You obtain an array containing the routes recorded by the
|
||||
* function registerDesignerSourcePath.
|
||||
* @return type
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getDesignerSourcePath()
|
||||
{
|
||||
try {
|
||||
return $this->_arrayDesignerSourcePath;
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user