Jump to content

Шаблон:Файли MW

From mediawiki.org
This page is a translated version of the page Template:MW file and the translation is 31% complete.


Документація шаблону

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.

{{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.
    • If the file has been recently renamed, you can use the stable= and the 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.
  • PATH is the path to the file; do not include a leading slash, include the trailing slash. Leave it blank for files in the root directory.
  • The class arguments are all optional, and if supplied will link to the generated documentation. CLASS should be the class name, as used in the URL. E.g. "Parser" would generate a link to "classParser.html". The template allows up to six class parameters, class1-class6
  • INTERFACE is similar. The template allows up to three interface parameters
  • The NotInGit argument is optional and should only be used if the file is not in Git for some reason (I think this only applies to LocalSettings.php). REASON is the reason that is displayed in the infobox. Note that NotInGit is case sensitive!

The Manual uses this template extensively.

Приклади

{{MW file|index.php|}}


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

{{MW file|WikiPage.php|includes/page/
|class1=WikiPage
|interface1=Page
}}

{{MW file|LocalSettings.php|
|NotInGit=створюється під час установки
}}


See also

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.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
nodisplaytitlenodisplaytitle

no description

Unknownoptional
File name1

no description

Unknownrequired
File path2

no description

Unknownrequired
Not in Git?NotInGit

Whether the version is in Git version control (only rarely used for files like LocalSettings.php and DevelopmentSettings.php)

Booleanoptional
Stable MediaWiki versionstable

no description

Unknownoptional
Legacy MediaWiki versionlegacy

no description

Unknownoptional
LTS MediaWiki Versionlts

Long-Term Support version for MediaWiki

Unknownoptional
Class 1class1

no description

Unknownsuggested
Class 2class2

no description

Unknownoptional
Class 3class3

no description

Unknownoptional
Class 4class4

no description

Unknownoptional
Class 5class5

no description

Unknownoptional
Class 6class6

no description

Unknownoptional
Interface 1interface1

no description

Unknownsuggested
Interface 2interface2

no description

Unknownoptional
Interface 3interface3

no description

Unknownoptional
Exampleexample

no description

Unknownoptional

Maintenance: noslash