Modul:Classgenerator/parameter

This is [[MediaWiki:Tagline]]. Set to <code>display:none</code> by chameleon skin.
< Modul:Classgenerator
Version vom 15. Januar 2016, 13:33 Uhr von imported>Oetterer
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu:Navigation, Suche
Documentation icon Module documentation[view] [edit] [history] [purge]


This module implements template {{Classgenerator/parameter}}.

Usage

{{#invoke:Classgenerator/parameter|main}}

It also provides some additional "gateways" to some of Module:Classgenerator/parameter/class's static methods:

{{#invoke:Classgenerator/parameter|categorize}}
{{#invoke:Classgenerator/parameter|categoryPage}}
{{#invoke:Classgenerator/parameter|explainDataStore}}
{{#invoke:Classgenerator/parameter|gardeningCategoryPage}}
{{#invoke:Classgenerator/parameter|sfGenerateForm}}
{{#invoke:Classgenerator/parameter|sfGenerateFormEntry}}
{{#invoke:Classgenerator/parameter|templateDocumentation}}

local p = {}
local Class = require('Module:Classgenerator/parameter/class')
local ClassDebug = require('Module:Debug/class')
local getArgs = require('Module:Arguments').getArgs

function p.categorize(frame)
	return tostring(Class:categorize())
end

function p.explainDataStore(frame)
	return tostring(Class:explainDataStore())
end

function p.sfGenerateForm(frame)
	return tostring(Class:sfGenerateForm())-- .. ClassDebug:printLog(9)
end

function p.templateDocumentation(frame)
	return tostring(Class:templateDocumentation(frame.args[1]))
end

function p.main(frame)
	local args = getArgs(frame)
	local me = Class:new(mw.title.getCurrentTitle().prefixedText)
	me:initFromArgs(args)
	me:storeData()
 	return me:render()-- .. ClassDebug:printLog(9)
end

return p