public package
Foswiki::Plugins public package
Foswiki::Plugins This module defines the singleton object that handles Plugins loading, initialization and execution.
This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins.
This is the version number of the plugins package. Use it for checking if you have a recent enough version.
This is a reference to the Foswiki session object. It can be used in plugins to get at the methods of the Foswiki kernel.
You are highly recommended to only use the methods in theFoswiki::Func
interface, unless you have no other choice,
as kernel methods may change between Foswiki releases.
ClassMethod
new( $session ) Construct new singleton plugins collection object. The object is a container for a list of plugins and the handlers registered by the plugins. The plugins and the handlers are carefully ordered.
ObjectMethod
finish() ObjectMethod
preload() → $loginName Find all active plugins, load the code and and invoke the preload handler
ObjectMethod
load($allDisabled) → $loginName initializeUserHandler
to be
called.
If allDisabled is set, no plugin handlers will be called.
ObjectMethod
settings() Push plugin settings onto preference stack
ObjectMethod
enable() Initialisation that is done after the user is known.
ObjectMethod
getPluginVersion() → $number ObjectMethod
addListener( $command, $handler ) $command
- name of the event
$handler
- the handler object.
invoke($command,...)
, which will be triggered
when the event is to be processed.
ObjectMethod
dispatch( $handlerName, …) ObjectMethod
haveHandlerFor( $handlerName ) → $boolean $handlerName
- name of the handler e.g. preRenderingHandler