internal package Foswiki::Configure::Wizard

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

package Foswiki::Configure::Wizard

A Wizard is module that performs one or more configuration functions. For example, you might have a wizard that helps set up email; when you have all the email settings done, you invoke the wizard to attempt to complete the configuration.

Any number of callable functions may be defined in a wizard. Each function fn has the signature:

ObjectMethod fn ($reporter, $spec) -> $boolean

Wizards can accept values from callers using the $this->param() method. Error messages etc are reported via the Foswiki::Configure::Reporter $reporter.

$spec is the root of the type specification tree for configuration entries. This is provided primarily for wizards that need to modify it e.g. installers.

Wizard functions may modify $Foswiki::cfg, but must report any such changes that have to persist using the $reporter->CHANGED method.

It's up to the UI how wizards are called, and their results returned. See the documentation for the UI for more information.

StaticMethod loadWizard($name, $param_source) → $wizard

Loads the Foswiki::Configure::Wizards subclass identified by $name. $param_source is a reference to an object that supports the param() method for getting parameter values.

ObjectMethod param($name) → $value

Returns the value of a parameter that was given when the wizard was invoked.

Topic revision: r1 - 03 May 2016, UnknownUser
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback