Cherry pick of PM-3193 to branch 3.0.1.4
This commit is contained in:
committed by
Enrique Ponce De Leon
parent
05ef7afbed
commit
0476ca2bba
@@ -101,6 +101,7 @@ class PMPluginRegistry
|
||||
private $_aTaskExtendedProperties = array ();
|
||||
private $_aDashboardPages = array ();
|
||||
private $_aCronFiles = array ();
|
||||
private $_aDesignerMenuFiles = array ();
|
||||
|
||||
/**
|
||||
* Registry a plugin javascript to include with js core at same runtime
|
||||
@@ -391,6 +392,11 @@ class PMPluginRegistry
|
||||
unset( $this->_aDashboardPages[$key] );
|
||||
}
|
||||
}
|
||||
foreach ($this->_aDesignerMenuFiles as $key => $detail) {
|
||||
if ($detail->namespace == $sNamespace) {
|
||||
unset( $this->_aDesignerMenuFiles[$key] );
|
||||
}
|
||||
}
|
||||
|
||||
//unregistering javascripts from this plugin
|
||||
$this->unregisterJavascripts( $sNamespace );
|
||||
@@ -1601,4 +1607,35 @@ class PMPluginRegistry
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register new options to designer menu
|
||||
*
|
||||
* @param unknown_type $namespace
|
||||
* @param unknown_type $cronFile
|
||||
*/
|
||||
public function registerDesignerNewOption ($namespace, $menuOptionFile)
|
||||
{
|
||||
$found = false;
|
||||
foreach ($this->_aDesignerMenuFiles as $row => $detail) {
|
||||
if ($menuOptionFile == $detail->menuOptionFile && $namespace == $detail->namespace) {
|
||||
$detail->menuOptionFile = $menuOptionFile;
|
||||
$found = true;
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
$menuOptionFile = new menuOptionFile( $namespace, $menuOptionFile );
|
||||
$this->_aDesignerMenuFiles[] = $menuOptionFile;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all designer menu Option files registered
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDesignerNewOption()
|
||||
{
|
||||
return $this->_aDesignerMenuFiles;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user