You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Hooking into an event in Blesta consists of merely filling in a stubbed callback method. Blesta offers a number of events that are automatically triggered when needed. These events may be found in the /installdir/components/events/ directory.

In some cases, for example when writing a plugin, you may wish to execute a custom event within the scope of your plugin. For instance, if your plugin allows for the creation of invoices, you may wish to execute an event when an invoice is created. For details on custom events see the Creating Events section of this manual.

Events

EventTriggered WhenDefault Event HandlerParametersReturns
AppController.preActionA URI is requestedEventsAppControllerCallback::preAction()voidvoid
Users.loginA user logs inEventsUsersCallback::login()voidvoid
Users.logoutA user logs outEventsUsersCallback::logout()voidvoid
Navigation.getSearchOptionsStaff search options are displayedEventsNavigationCallback::getSearchOptions()
  • options - A key/value pair of search options where each key is the URI to redirect search queries to and the value is the name of the search option. When implemented, the event handler should modify the options parameter.
void
  • No labels