PerlDoc

24 Jun 2022 - 10:02 | Version 1 |
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::Configure
Child packages:

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.

Kontakt
Pädagogische Hochschule Schwyz
Zaystrasse 42
CH-6410 Goldau
T +41 41 859 05 90
info@phsz.ch Dies ist ein Wiki des Fachkerns Medien und Informatik der Pädagogischen Hochschule Schwyz. Für Fragen wenden Sie sich bitte an wikiadmin@phsz.ch
This page was cached on 09 Apr 2025 - 19:15.
This website is using cookies. More info. That's Fine