Anonymous user
Module:Protection banner: Difference between revisions
some more work on the Blurb class
Enwikipedia>Mr. Stradivarius (make some image tweaks and start a function for substituting blurb parameters) |
Enwikipedia>Mr. Stradivarius (some more work on the Blurb class) |
||
Line 164:
local Blurb = class('Blurb')
function Blurb:initialize(
self.
self._protectionStatusObj = protectionStatusObj
self._bannerConfig = configObj:getBannerConfig(protectionStatusObj)
self._namespace = namespace
end
function Blurb:
end
function Blurb:_makePagetypeParameter()
local pagetypes = self._configObj:getConfigTable('pagetypeNamespaces')
return pagetypes[self._namespace] or pagetypes.default or 'page'
end
function Blurb:_substituteParameters(msg)
if not self._params then
local params, parameterFuncs = {}, {}
Line 183 ⟶ 194:
parameterFuncs[1] = function ()
return self:_makeIntroParameter()
end
-- TODO: Write parameter functions
self._params = params
|