This is the documentation page for Module:SOM.meta.SimpleAttribute
Utilities to define a Simple Attribute class.
- generate(
args
) - Generates a Simple Attribute class.
- args:
class_name
: the class name, e.g.SOM.Simple.HasSomeValue
docstring
: description of the classproperty_root
: root of the SMW property used for attaching the value, e.g.Has some value
value_input_type
: (nil, string) input type to use for a PageForms fieldvalue_extra_args
: (nil, string) extra args to use for a PageForms fieldmultivalued
: (nil, boolean) if true, allow multiple (comma-separated) valuesrender_formatter
: (nil, function) custom formatting function, to be invoked by the class'render()
method. This function will be called with the same arguments passed torender()
, and should return wikitext or nil.- returns:
- Returns the new class (as a table).