Modul:Classgenerator

This is [[MediaWiki:Tagline]]. Set to <code>display:none</code> by chameleon skin.
Wechseln zu:Navigation, Suche
Documentation icon Module documentation[view] [edit] [history] [purge]

This module implements template {{Classgenerator}}.

Usage

{{#invoke:Classgenerator|main}}

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

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

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

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

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

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

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

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

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

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

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

return p