Module:SOM.meta.SimpleAttribute/doc

From SunshinePPS Wiki

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 class
property_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 field
value_extra_args : (nil, string) extra args to use for a PageForms field
multivalued : (nil, boolean) if true, allow multiple (comma-separated) values
render_formatter : (nil, function) custom formatting function, to be invoked by the class' render() method. This function will be called with the same arguments passed to render(), and should return wikitext or nil.
returns:
Returns the new class (as a table).

(/doc page)