K (Schützte „Modul:Classgenerator“: Automatic protection of selected project pages ([Bearbeiten=Nur Administratoren erlauben] (unbeschränkt) [Verschieben=Nur Administratoren erlauben] (unbeschränkt))) |
|||
(2 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
local p = {} | local p = {} | ||
local Class = require('Module:Classgenerator/class') | local Class = require('Module:Classgenerator/class') | ||
− | |||
local getArgs = require('Module:Arguments').getArgs | local getArgs = require('Module:Arguments').getArgs | ||
Zeile 21: | Zeile 20: | ||
function p.sfGenerateForm(frame) | function p.sfGenerateForm(frame) | ||
− | return tostring(Class:sfGenerateForm() | + | return tostring(Class:sfGenerateForm()) |
end | end | ||
Zeile 39: | Zeile 38: | ||
me:addInfobox() | me:addInfobox() | ||
me:addPageBody() | me:addPageBody() | ||
− | return me:render( | + | return me:render() |
end | end | ||
return p | return p |
Aktuelle Version vom 6. April 2023, 19:20 Uhr
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
This module implements template {{Classgenerator}}.
Usage[Quelltext bearbeiten]
{{#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