skins: Port SkinFallback and SkinApiOutput to a generic SkinMustache class
The new SkinMustache class is based on the emerging class in Vector.
Having this in core, will allow Vector to make use of this class
immediately and provide a minimal generic mechanism going forward
for rendering skins using Mustache. For now, I've fleshed out the minimum
possible data in getTemplateData which are based on existing functions in
The Skin class now takes a generic options parameter which allows
registration of a skin using the SkinMustache class with a templateDirectory
option pointing to the associated template. A styles option can be passed
to define stylesheets that should be associated with the skin.
The SkinApi and SkinFallback classes are reduced significantly.
There are no known uses of SkinApiTemplate and it is thus removed.
SkinFallbackTemplate is removed and its functions copied across to
End user changes:
- The fallback skin no longer prints the confusing warning message if the default skin is setup incorrectly. Previously viewing the fallback skin with useskin indicated that wgDefaultSkin was not set correctly which was misleading and confusing.
- Factory functions now receive skin options as a second parameter and the service as a first - this is due to how ObjectFactory handles the extraArgs key for 'factory' key
- placing it at the beginning.