See
PublishedAPI for packages intended to be used by Plugin and Contrib authors, or
browse all packages.
See also
Developing plugins,
Developer's Bible,
Technical Overview
base class to hook into the foswiki core
initPlugin($topic, $web, $user) → $boolean
initialize the plugin, automatically called during the core initialization process
finisPlugin()
clean up after session has finished
getCore()
get core of this plugin
beforeSaveHandler($text, $topic, $web, $meta )
called before a topic is saved to the store
beforeUploadHandler(\%attrHash, $meta )
called before an attachment is uploaded or changed
afterRenameHandler( $oldWeb, $oldTopic, $oldAttachment, $newWeb, $newTopic, $newAttachment )
called when a topic or attachment has been renamed
public api to register a revision comment for the next save operation
example:
my $comment = Foswiki::Plugins::setComment({
text => "revision message",
minor => 0 / 1, # optional
});
my $comment = Foswiki::Plugins::setComment("revision message");
The
$comment return value is the object being used in the final
store procedure creating the revision comment. It will be invalidated
once the save handler have been executed. So don't keep hold of them
for too long.