internal package Foswiki::Configure::Value

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

internal package Foswiki::Configure::Value is a Foswiki::Configure::Item

A Value object is a Foswiki::Configure::Item that represents a single entry in a *.spec or LocalSite.cfg file i.e. it is the leaf type in a configuration model.

Values come in two types; 'DEFAULT' and 'CURRENT'; a DEFAULT type is read from a *.spec file and a CURRENT type from LocalSite.cfg (or taken from URL parameters)

Note that this object does not store the "actual" value of a configuration item; that is done by a Foswiki::Configure::Valuer. This object is the model only.

ClassMethod new($typename, %params)

%params may include:
  • parent node
  • keys e.g {Garden}{Flowers}
  • expertsOnly boolean
  • opts options
Constructor. The opts are attributes, and by convention may be a number (for a string length), a comma separated list of values (for a select) and may also have an M for mandatory, or a H for hidden.

ObjectMethod getType() → $type

Get the Foswiki::Configure::Type object that specifies the type of this value.

ObjectMethod getValueObject($keys)

Get the value

asString( $valuer, $valueType) -> $value

- $valueType: (int) value of VALUE_TYPE, either 'CURRENT' or 'DEFAULT'

Topic revision: r1 - 19 Apr 2011, ProjectContributor
 
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 FAIR Wiki? Send feedback