Add hook to overwrite cases-ajaxListener actions
This commit is contained in:
@@ -39,6 +39,8 @@ define('PM_CASE_DOCUMENT_LIST_ARR', 1010);
|
||||
define('PM_LOGIN', 1011);
|
||||
define('PM_UPLOAD_DOCUMENT_BEFORE', 1012);
|
||||
define('PM_CREATE_NEW_DELEGATION', 1013);
|
||||
define('PM_SINGLE_SIGN_ON', 1014);
|
||||
define('PM_GET_CASES_AJAX_LISTENER', 1015);
|
||||
|
||||
/**
|
||||
* @package workflow.engine.classes
|
||||
|
||||
@@ -34,12 +34,6 @@
|
||||
//require_once 'classes/model/AppDelay.php';
|
||||
//require_once 'classes/model/Process.php';
|
||||
//require_once 'classes/model/Task.php';
|
||||
G::LoadClass( 'case' );
|
||||
|
||||
$action = $_REQUEST['action'];
|
||||
unset( $_REQUEST['action'] );
|
||||
$ajax = new Ajax();
|
||||
$ajax->$action( $_REQUEST );
|
||||
|
||||
class Ajax
|
||||
{
|
||||
@@ -828,3 +822,21 @@ class Ajax
|
||||
}
|
||||
}
|
||||
|
||||
$pluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
if ($pluginRegistry->existsTrigger(PM_GET_CASES_AJAX_LISTENER)) {
|
||||
$ajax = $pluginRegistry->executeTriggers(PM_GET_CASES_AJAX_LISTENER, null);
|
||||
} else {
|
||||
$ajax = new Ajax();
|
||||
}
|
||||
|
||||
if (!($ajax instanceof Ajax)) {
|
||||
$ajax = new Ajax();
|
||||
}
|
||||
|
||||
G::LoadClass( 'case' );
|
||||
|
||||
$action = $_REQUEST['action'];
|
||||
|
||||
unset( $_REQUEST['action'] );
|
||||
|
||||
$ajax->$action( $_REQUEST );
|
||||
Reference in New Issue
Block a user