Template:MW file
Файл MediaWiki: {{{1}}} | |
---|---|
Расположение: | / |
Исходный код: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Классы: | Найти код • Найти документацию |
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 thelegacy=
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.
- If the file has been recently renamed, you can use the
- PATH is the path to the file; do not include a leading slash, include the trailing slash. Оставьте это поле пустым для файлов в корневом каталоге.
- 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 toLocalSettings.php
). REASON is the reason that is displayed in the infobox. Note thatNotInGit
is case sensitive!
The Manual uses this template extensively.
Примеры
{{MW file|index.php|}}
Файл MediaWiki: index.php | |
---|---|
Расположение: | |
Исходный код: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Классы: | Найти код • Найти документацию |
{{MW file|Article.php|includes/page/ |class1=Article }}
Файл MediaWiki: Article.php | |
---|---|
Расположение: | includes/page/ |
Исходный код: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Классы: | Article |
{{MW file|WikiPage.php|includes/page/ |class1=WikiPage |interface1=Page }}
Файл MediaWiki: WikiPage.php | |
---|---|
Расположение: | includes/page/ |
Исходный код: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Классы: | WikiPage • Page |
{{MW file|LocalSettings.php| |NotInGit=создается во время установки }}
Файл MediaWiki: LocalSettings.php | |
---|---|
Расположение: | |
Исходный код: | нет в Git (создается во время установки) |
Классы: |
См. также
- {{Git file }} — a simple link to a file on gerrit (from mediawiki/core or otherwise)
- Category:MediaWiki code pages without class names — incompletely filled pages are automatically listed by this template
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
nodisplaytitle | nodisplaytitle | no description | Unknown | optional |
File name | 1 | no description | Unknown | required |
File path | 2 | no description | Unknown | required |
Not in Git? | NotInGit | Whether the version is in Git version control (only rarely used for files like LocalSettings.php and DevelopmentSettings.php) | Boolean | optional |
Stable MediaWiki version | stable | no description | Unknown | optional |
Legacy MediaWiki version | legacy | no description | Unknown | optional |
LTS MediaWiki Version | lts | Long-Term Support version for MediaWiki | Unknown | optional |
Class 1 | class1 | no description | Unknown | suggested |
Class 2 | class2 | no description | Unknown | optional |
Class 3 | class3 | no description | Unknown | optional |
Class 4 | class4 | no description | Unknown | optional |
Class 5 | class5 | no description | Unknown | optional |
Class 6 | class6 | no description | Unknown | optional |
Interface 1 | interface1 | no description | Unknown | suggested |
Interface 2 | interface2 | no description | Unknown | optional |
Interface 3 | interface3 | no description | Unknown | optional |
Example | example | no description | Unknown | optional |
Maintenance: noslash