This commit is contained in:
Paula V. Quispe
2016-11-25 13:06:25 -05:00
parent 26e9d3a687
commit 9b60fdb682
13 changed files with 236 additions and 12 deletions

View File

@@ -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;
}
}
}