<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://www.verzauberte-welten.de/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AClassengine-template-module-class-documentation-page</id>
	<title>MediaWiki:Classengine-template-module-class-documentation-page - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://www.verzauberte-welten.de/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AClassengine-template-module-class-documentation-page"/>
	<link rel="alternate" type="text/html" href="https://www.verzauberte-welten.de/index.php?title=MediaWiki:Classengine-template-module-class-documentation-page&amp;action=history"/>
	<updated>2026-04-05T23:46:28Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Verzauberte Welten e.V.</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.verzauberte-welten.de/index.php?title=MediaWiki:Classengine-template-module-class-documentation-page&amp;diff=4445&amp;oldid=prev</id>
		<title>imported&gt;Oetterer am 15. Januar 2016 um 19:31 Uhr</title>
		<link rel="alternate" type="text/html" href="https://www.verzauberte-welten.de/index.php?title=MediaWiki:Classengine-template-module-class-documentation-page&amp;diff=4445&amp;oldid=prev"/>
		<updated>2016-01-15T19:31:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{((}}documentation subpage{{))}}&lt;br /&gt;
{{((}}module rating|protected{{))}}&lt;br /&gt;
&amp;lt;!{{#invoke:String|rep|-|2}} Categories go at the bottom of this page and interwikis go in Wikidata. {{#invoke:String|rep|-|2}}&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a Class Module. It implements a class in Lua using [[Module:Middleclass]] and the template class [[Module:Foundationclass]]. This class provides methods for PURPOSE.&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}} Usage {{=}}{{=}}&lt;br /&gt;
{{((}}code|lang=lua|code=&lt;br /&gt;
local name = args[1] or args.name or mw.title.getCurrentTitle().rootText&lt;br /&gt;
local Class = require('Module:$1/class')&lt;br /&gt;
local me = Class:new(mw.title.getCurrentTitle().prefixedText)&lt;br /&gt;
me:initFromArgs(args)&lt;br /&gt;
me:storeData()&lt;br /&gt;
me:addInfobox()&lt;br /&gt;
me:addPageBody()&lt;br /&gt;
return me:render()&lt;br /&gt;
{{))}}&lt;br /&gt;
&lt;br /&gt;
{{((}}#invoke:$1|explainDataStore{{))}}&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}} Methods {{=}}{{=}}&lt;br /&gt;
{{=}}{{=}}{{=}} Constructor {{=}}{{=}}{{=}}&lt;br /&gt;
{{=}}{{=}}{{=}}{{=}} new(uid, superhandler) {{=}}{{=}}{{=}}{{=}}&lt;br /&gt;
Creates a new Object for the class.&lt;br /&gt;
;uid&lt;br /&gt;
:variable, optional&lt;br /&gt;
:used to identify the object&lt;br /&gt;
;superhandler&lt;br /&gt;
:object of childclass of Foundationclass, optional&lt;br /&gt;
:supply the superhandler, if you instanciate this object within another object. the instanciated object will pass errors and warnings to the superhandler and forgo adding the object category&lt;br /&gt;
;return&lt;br /&gt;
:object, of the class&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}}{{=}} public methods {{=}}{{=}}{{=}}&lt;br /&gt;
{{=}}{{=}}{{=}}{{=}} addInfobox() {{=}}{{=}}{{=}}{{=}}&lt;br /&gt;
If no errors and data is present, adds an infobox to the object's output.&lt;br /&gt;
{{((}}small|&lt;br /&gt;
;return&lt;br /&gt;
:boolean, whether adding was successful or not&lt;br /&gt;
{{))}}&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}}{{=}}{{=}} addPageBody() {{=}}{{=}}{{=}}{{=}}&lt;br /&gt;
Adds a page body (all content besides the infobox) to the object's output: Errors and Warnings, sample configuration, statistics, ... Of course, only if there is data.&lt;br /&gt;
{{((}}small|&lt;br /&gt;
;return&lt;br /&gt;
:boolean, whether adding was successful or not&lt;br /&gt;
{{))}}&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}}{{=}}{{=}} myArgumentProcessing(coreData) {{=}}{{=}}{{=}}{{=}}&lt;br /&gt;
Performs the individual argument processing in [[#initFromArgs(args)|initFromArgs(args)]] right before inititializing it.&lt;br /&gt;
{{((}}small|&lt;br /&gt;
;coreData&lt;br /&gt;
:table, mandatory&lt;br /&gt;
:the core data of the object. the one to process individually before initialization&lt;br /&gt;
;return&lt;br /&gt;
:table, the new core data array to be used&lt;br /&gt;
{{))}}&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}}{{=}}{{=}} myDataAdjustments(data) {{=}}{{=}}{{=}}{{=}}&lt;br /&gt;
Performs a transformation form data (coming from the datastore) into data used for argument processing. This is called by [[#initFromData(data)|initFromData(data)]] (for smw: after property to parameter conversion)&lt;br /&gt;
and is directly passed to [[#initFromArgs(args)|initFromArgs(args)]] and subsequently plausibility test.&lt;br /&gt;
{{((}}small|&lt;br /&gt;
;data&lt;br /&gt;
:table, mandatory&lt;br /&gt;
:a data table coming directly from the data store&lt;br /&gt;
;return&lt;br /&gt;
:table, the new data table suiteable for argument processing&lt;br /&gt;
{{))}}&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}}{{=}}{{=}} myPlausibilityTest(args) {{=}}{{=}}{{=}}{{=}}&lt;br /&gt;
Performs the individual plausibility tests in [[#initFromArgs(args)|initFromArgs(args)]] before entering the initialization part.&lt;br /&gt;
NOTE: The return value will be ignored. If this finds errors, it must add them to the list of errors via [[#addError(errortext)|addError(errortext)]].&lt;br /&gt;
{{((}}small|&lt;br /&gt;
;args&lt;br /&gt;
:table, mandatory&lt;br /&gt;
:arguments passed to the template to be checked&lt;br /&gt;
;return&lt;br /&gt;
:boolean, whether the object is plausible or not.&lt;br /&gt;
{{))}}&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}}{{=}}{{=}} myStashAdjustments(stash, storeType) {{=}}{{=}}{{=}}{{=}}&lt;br /&gt;
Performs the adjusts the stash in [[#storeData()|storeData()]] right before storing it.&lt;br /&gt;
{{((}}small|&lt;br /&gt;
;stash&lt;br /&gt;
:table, mandatory&lt;br /&gt;
:the array of data to be saved (in the form fieldname: value)&lt;br /&gt;
;storeType&lt;br /&gt;
:string, mandatory&lt;br /&gt;
:type of storage method used with the current call (either 'cargo' or 'swm'). In case you use both stores and your stash adjustment differs with each of this methods&lt;br /&gt;
;return&lt;br /&gt;
:boolean, the new stash&lt;br /&gt;
{{))}}&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}}{{=}} static methods {{=}}{{=}}{{=}}&lt;br /&gt;
{{=}}{{=}}{{=}}{{=}} $2:mySfDynamicFieldAttribute(fieldname, attribute, value) {{=}}{{=}}{{=}}{{=}}&lt;br /&gt;
For some semantic form fields there are attribute values, that are not static, thus can not be provided at forehand in the [[#Configuration Data|configuration file]]. This method does the trick to adapt them at runtime shortly before the field is rendered.&lt;br /&gt;
Essentially: the method checks, if it has a special rule for the pair fieldname:attribute and if so, calculates the new value. if not, the old value is returned. Note, that you can completely disable a form field with this when you &lt;br /&gt;
return false on attribute &amp;quot;disable&amp;quot;.&lt;br /&gt;
{{((}}small|&lt;br /&gt;
;fieldname&lt;br /&gt;
:string, mandatory&lt;br /&gt;
:the form field's name, needed to match current paring to an existing special treatment rule&lt;br /&gt;
;attribute&lt;br /&gt;
:string, mandatory&lt;br /&gt;
:the form field's attribute, needed to match current paring to an existing special treatment rule&lt;br /&gt;
;value&lt;br /&gt;
:variable, mandatory&lt;br /&gt;
:the value, that is already provided in the [[#Configuration Data|configuration file]]. this will be adapted by the method, if there is a special rule for the pair fieldname:attribute.&lt;br /&gt;
;return&lt;br /&gt;
:string, the value to be used forthwith (which can be the old one or a freshly calculated)&lt;br /&gt;
{{))}}&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}}{{=}} private methods {{=}}{{=}}{{=}}&lt;br /&gt;
{{=}}{{=}}{{=}}{{=}} _debug(self, level, text) {{=}}{{=}}{{=}}{{=}}&lt;br /&gt;
Adds output to the internal debug log.&lt;br /&gt;
{{((}}small|&lt;br /&gt;
;self&lt;br /&gt;
:object, me&lt;br /&gt;
;level&lt;br /&gt;
:int; mandatory&lt;br /&gt;
:debug level for the message&lt;br /&gt;
;text&lt;br /&gt;
:string; mandatory&lt;br /&gt;
:debug message text&lt;br /&gt;
;return&lt;br /&gt;
:void&lt;br /&gt;
{{))}}&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}} Properties {{=}}{{=}}&lt;br /&gt;
{{=}}{{=}}{{=}} static {{=}}{{=}}{{=}}&lt;br /&gt;
See also [[#Static Properties|Static Properties]]&lt;br /&gt;
;$2.myConfiguration&lt;br /&gt;
:this is your configuration. It is devided in several section, each a&lt;br /&gt;
:table, holds configuration data found in Module:$1/config&lt;br /&gt;
::'''WARNING:''' This is a read only table and besides functions ''pairs()'' and ''ipairs()'' nothing else will work on it, especially not the functions of the table library!&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* form, table, holds data used to create the form. here are some of them:&lt;br /&gt;
** formButtons, table, which buttons should be printed at the bottom&lt;br /&gt;
** fieldOrder, table, in which order the form fields should appear (note: only fields listed here will be added to the form)&lt;br /&gt;
* global, table, holds some global configuration data&lt;br /&gt;
* parameter, table, holds all data about all parameter used in the module (be they form only, data store only or normal). The table has the form ''paramname = { table of paramdata }''. The tables for the parameter have data as follows:&lt;br /&gt;
** cardinality, string, mandatory, one of singe or list&lt;br /&gt;
** cargo_type, string, optional, if the parameter is to be stored in cargo, add the field type here (one of Page, Text, Integer, Float, Date, Datetime, Boolean (which should be provided as 1 or 0), Coordinates, Wikitext, File, String, URL, or Email)&lt;br /&gt;
** description, string, mandatory, a description of this parameter&lt;br /&gt;
** label, string, mandatory, the label used in the form and the template documentation&lt;br /&gt;
** property_name, string, optional, if the parameter is to be stored in smw, add the property name here&lt;br /&gt;
** property_type, string, optional, if the parameter is to be stored in smw, add the property type here (defaults to page)&lt;br /&gt;
** severity, string, optional, if provided one of mandatory, suggested&lt;br /&gt;
** sf, table, optional, used to add more attributes to the semantic forms field. ref [[Module:SFfield/config]] for all possible attributes. Note that the table is of type attribute_name : value. Value can be of type string, integer, boolean, and (in case of 'show on select') a table. Please note, that the attribute name cannot contain a &amp;quot; &amp;quot; (space). Use the underscore instead.&lt;br /&gt;
** td_default, string, optional, if you want a default value to be indicated in the template data section on the documentation page, add it here&lt;br /&gt;
** td_type, string, optional, if the parameter should be present in the template documentation page, fill this field. all possible values are listed [https://www.mediawiki.org/wiki/Extension:TemplateData#Format here]&lt;br /&gt;
** values, table, optional, if you want the possible values to be restricted to a specific set, fill this table&lt;br /&gt;
* template, table, holds some data used only in the template&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
;$2.publicStaticProperty&lt;br /&gt;
:type, explanation&lt;br /&gt;
;_privateStaticProperty&lt;br /&gt;
:type, explanation&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}}{{=}} private {{=}}{{=}}{{=}}&lt;br /&gt;
Note: all private properties are stored in table ''_private[self]''. _private is a static array that is indexed by ''self'', so the table ''_private[self]'' holds all properties for instance ''self''.&lt;br /&gt;
;dbg&lt;br /&gt;
:object, my instance of [[Module:Debug/class]] for debugging purposes. only present afer first call of [[#_debug(self, level, text)|_debug(self, level, text)]]&lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}} Configuration Data {{=}}{{=}}&lt;br /&gt;
This class holds its control data in [[Module:{{((}}BASEPAGENAME{{))}}/config]]. &lt;br /&gt;
&lt;br /&gt;
{{=}}{{=}} Inheritance {{=}}{{=}}&lt;br /&gt;
'''Note:''' You still reference those either by self:publicMethod() or $2:staticMethod() and $2.staticProperty respectively!&lt;br /&gt;
{{=}}{{=}}{{=}} Methods {{=}}{{=}}{{=}}&lt;br /&gt;
{{((}}MediaWiki:Classengine-content-documentation-methods{{))}}&lt;br /&gt;
{{=}}{{=}}{{=}} Static Properties {{=}}{{=}}{{=}}&lt;br /&gt;
{{((}}MediaWiki:Classengine-content-documentation-properties{{))}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{((}}#invoke:$1|categorize{{))}}&amp;lt;/includeonly&amp;gt;&amp;lt;include&amp;lt;includeonly&amp;gt;&amp;lt;/includeonly&amp;gt;only&amp;gt;{{((}}#ifeq:{{((}}SUBPAGENAME{{))}}|sandbox||&lt;br /&gt;
&amp;lt;!{{#invoke:String|rep|-|2}} Note: the class engine sets the categories &amp;quot;$3&amp;quot; and &amp;quot;$4&amp;quot; automatically in categorize {{#invoke:String|rep|-|2}}&amp;gt;&lt;br /&gt;
&amp;lt;!{{#invoke:String|rep|-|2}} Categories go here if you wish an additional category to that set in {{((}}module rating{{))}} above automatically. {{#invoke:String|rep|-|2}}&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{))}}&amp;lt;/include&amp;lt;includeonly&amp;gt;&amp;lt;/includeonly&amp;gt;only&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Oetterer</name></author>
	</entry>
</feed>