Template:MW file

From RobotX
Revision as of 04:11, 21 December 2019 by Joelmartin (talk | contribs) (Text replacement - "<translate>" to "")
Jump to navigation Jump to search


Usage

Displays an informative box about a file in MediaWiki core, with links to its source code in master, stable, and legacy branches, and links to its classes and interfaces in the generated PHP documentation. </translate>

{{MW file|FILENAME|PATH
|class1=CLASS
|class2=CLASS
|class3=CLASS
|...
|interface1=INTERFACE
|interface2=INTERFACE
|interface3=INTERFACE
|NotInGit=REASON
}}
  • FILENAME is the name of the file, including extension.</translate>
    • If the file has been recently renamed, you can use the <tvar|stable>stable=</> and the <tvar|legacy>legacy=</> parameters to provide the old name so links work; you'll need to update the template invocation as the release in which the file was renamed moves from master->stable->legacy.</translate>
  • PATH is the path to the file; do not include a leading slash, include the trailing slash.</translate> Leave it blank for files in the root directory.</translate>
  • The class arguments are all optional, and if supplied will link to the generated documentation.</translate> CLASS should be the class name, as used in the URL.</translate> E.g. "Parser" would generate a link to "classParser.html".</translate> The template allows up to six class parameters, class1-class6</translate>
  • INTERFACE is similar.</translate> The template allows up to three interface parameters</translate>
  • The NotInGit argument is optional and should only be used if the file is not in [[<tvar|git>Special:MyLanguage/Git</>|Git]] for some reason (I think this only applies to LocalSettings.php).</translate> REASON is the reason that is displayed in the infobox.</translate> Note that NotInGit is case sensitive!</translate>


The [[<tvar|manual>Special:MyLanguage/Manual:Contents</>|Manual]] uses this template extensively.

Examples

</translate>

{{MW file|index.php|}}

{{MW file|Article.php|includes/page/
|class1=Article
}}

{{MW file|LocalSettings.php|
|NotInGit=<!--T:18--> created during installation</translate>
}}


See also

</translate>


Maintenance: noslash