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

Compare with Current View Page History

« Previous Version 9 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 WhenTriggered InDefault Event Handler
AppController.preActionA URI is requestedAppController::preAction()

 

EventsAppControllerCallback::preAction()
Users.LoginA user logs inUsers::login()EventsUsersCallback::login()
Users.LogoutA user logs outUsers::logout()EventsUsersCallback::logout()
  • No labels