Changes

Jump to navigation Jump to search

Module:Protection banner

66 bytes added, 14:18, 28 June 2014
use a __tostring metamethod to render the banner objects
:caption(self._imageCaption)
:render()
end
 
function BannerTemplate:render()
-- Dummy method, to be implemented by the subclasses.
return ''
end
end
function Banner:rendersetPage(s) -- This specifies the pageto generate the banner for. This only affects -- Module:Message box if the page specified is not the current page. self._page = send function Banner:__tostring()
-- Renders the banner.
-- The page parameter specifies the page to generate the banner for, for
-- testing purposes.
mMessageBox = mMessageBox or require('Module:Message box')
local reasonText = self._reasonText or error('no reason text set')
local explanationText = self._explanationText
local mbargs = {
page = pageself._page,
type = 'protection',
image = self:renderImage(),
end
function Padlock:render__tostring()
local root = mw.html.create('div')
root
end
-- Set the text fieldsand the page name.
if not isPadlock then
bannerObj:setReasonText(blurbObj:makeReasonText())
bannerObj:setExplanationText(blurbObj:makeExplanationText())
bannerObj:setPage(titleObj.prefixedText)
end
ret[#ret + 1] = tostring(bannerObj:render()
end
Anonymous user

Navigation menu