University of Natural Resources and Life Sciences (BOKU)
Institute of Computational Biology

PerlDoc

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


Parent package: Foswiki::Plugins
Child packages:

internal package Foswiki::Plugins::ImportExportPlugin

initPlugin($topic, $web, $user) → $boolean

doCheck($session) → $text

doImport($session) → $text

This is an example of a sub to be called by the rest script. The parameter is:
  • $session - The Foswiki object associated to this session.

Additional parameters can be recovered via the query object in the $session, for example:

my $query = $session->{request}; my $web = $query->{param}->{web}[0];

If your rest handler adds or replaces equivalent functionality to a standard script provided with Foswiki, it should set the appropriate context in its switchboard entry. A list of contexts are defined in IfStatements#Context_identifiers.

For more information, check CommandAndCGIScripts#rest

For information about handling error returns from REST handlers, see Foswiki:Support.Faq1

Since: Foswiki::Plugins::VERSION 2.0

renderWikiWordHandler($linkText, $hasExplicitLinkLabel, $web, $topic) → $linkText

  • $linkText - the text for the link i.e. for [[Link][blah blah]] it's blah blah, for BlahBlah it's BlahBlah, and for Blah Blah it's Blah Blah.
  • $hasExplicitLinkLabel - true if the link is of the form [[Link][blah blah]] (false if it's =[Blah]] or =BlahBlah)
  • $web, $topic - specify the topic being rendered

Called during rendering, this handler allows the plugin a chance to change the rendering of labels used for links.

Return the new link text.

Since: Foswiki::Plugins::VERSION 2.0

Topic revision: r1 - 24 Jun 2022, ProjectContributor
10 Jan 2025 - 22:59 Foswiki v2.1.9