Add InitializePlugin and CleanupPlugin events
We add two events to allow plugins to initialize and cleanup.
This commit is contained in:
parent
5d246299b6
commit
f4e8cc6d9f
|
@ -1,3 +1,8 @@
|
|||
InitializePlugin: a chance to initialize a plugin in a complete
|
||||
environment
|
||||
|
||||
CleanupPlugin: a chance to cleanup a plugin at the end of a program
|
||||
|
||||
StartPrimaryNav: Showing the primary nav menu
|
||||
- $action: the current action
|
||||
|
||||
|
|
|
@ -85,3 +85,8 @@ if (!file_exists($actionfile)) {
|
|||
$sac->showPage();
|
||||
}
|
||||
}
|
||||
|
||||
// XXX: cleanup exit() calls or add an exit handler so
|
||||
// this always gets called
|
||||
|
||||
Event::handle('CleanupPlugin');
|
||||
|
|
|
@ -212,3 +212,7 @@ function __autoload($class)
|
|||
require_once(INSTALLDIR.'/lib/' . strtolower($class) . '.php');
|
||||
}
|
||||
}
|
||||
|
||||
// Give plugins a chance to initialize in a fully-prepared environment
|
||||
|
||||
Event::handle('InitializePlugin');
|
||||
|
|
Loading…
Reference in New Issue
Block a user