Custom Handlers

In addition to many built-in handlers, you can create your own handlers and register them globally.

If you add any custom handlers to your applications and wish to trigger them or want to trigger LiveWhale’s handlers from within your code, use the following:

1
2
3
4
5
6
7
8
9
10
11
// to call all handlers of a specific type
// $scope : string, 'application', 'data' or 'widget'
// $handlerName : string name of the handler, e.g. 'onLoad'
// $params : associative array of parameters [optional]

$_LW->callHandlersByType($scope, $handlerName, $params);

// or to call a specific module's handler directly
// $moduleName : string name of the module

$_LW->callHandler($scope, $moduleName, $handlerName, $params);