Module:Article history/doc: Difference between revisions

Content deleted Content added
m Undid revision 630751865 by Mr. Stradivarius (talk) changed my mind
start documenting the classes
Line 1:
This module implements {{lt|Article history}}. It has a configuration module at {{lmd|Article history/config}}, and a Category class at {{lmd|Article history/Category}}.
 
== Object documentation ==
 
=== ArticleHistory ===
 
ArticleHistory objects have the following public properties:
 
* <code>args</code> - a table of the arguments passed to the module by the user.
* <code>currentTitle</code> - the [[mw:Extension:Scribunto/Lua reference manual|title object]] for the current page.
* <code>cfg</code> - the module config table. This is taken from the config module at [[Module:Article history/config]], but is structured slightly differently due to preprocessing by the main module. Any table with an "aliases" subtable has this table removed, and the aliases are added as keys that the table can be accessed from. Conceptually, the config table {{code|1={ foo = {"a value", aliases = {"bar", "baz"} } }|2=lua}} would become {{code|1={foo = {"a value"}, bar = {"a value"}, baz = {"a value"} }|2=lua}}. (Although "bar" and "baz" would actually be references to the "foo" table, rather than completely new tables.)
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||