From a9a1bd149e05d42c167bb720cb67aab510815e95 Mon Sep 17 00:00:00 2001 From: qronald Date: Tue, 14 Feb 2017 15:49:14 -0400 Subject: [PATCH] remove extend in action disable --- workflow/engine/classes/class.plugin.php | 11 +++++++++++ workflow/engine/classes/class.pluginRegistry.php | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/workflow/engine/classes/class.plugin.php b/workflow/engine/classes/class.plugin.php index a4da2dd9c..675963b6e 100644 --- a/workflow/engine/classes/class.plugin.php +++ b/workflow/engine/classes/class.plugin.php @@ -360,6 +360,17 @@ class PMPlugin $oPluginRegistry->registerExtendsRestService($this->sNamespace, $className); } + /** + * Register a extend rest service and expose it + * + * @param string $className that is name class to extends + */ + function disableExtendsRestService($className) + { + $oPluginRegistry =& PMPluginRegistry::getSingleton(); + $oPluginRegistry->disableExtendsRestService($this->sNamespace, $className); + } + /** * Unregister a rest service * diff --git a/workflow/engine/classes/class.pluginRegistry.php b/workflow/engine/classes/class.pluginRegistry.php index 6cedb0d88..dec148504 100644 --- a/workflow/engine/classes/class.pluginRegistry.php +++ b/workflow/engine/classes/class.pluginRegistry.php @@ -1492,6 +1492,20 @@ class PMPluginRegistry { return isset($this->_restExtendServices[$className]) ? $this->_restExtendServices[$className] : array(); } + + /** + * Remove a extend rest service class from a plugin to be served by processmaker + * + * @param string $className The service (api) class name + * @return bool + */ + public function disableExtendsRestService($sNamespace, $className) + { + if (isset($this->_restExtendServices[$className])) { + unset($this->_restExtendServices[$className]); + } + } + /** * Unregister a rest service class of a plugin *