Template:MW file

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

テンプレートの解説

MediaWiki コアのファイルに関する基礎情報ボックスを表示します。master、安定版、レガシーの各ブランチのソース コードへのリンクと、生成された PHP 説明文書のクラスとインターフェイスへのリンクが含まれます。

{{MW file|FILENAME|PATH
|class1=CLASS
|class2=CLASS
|class3=CLASS
|...
|interface1=INTERFACE
|interface2=INTERFACE
|interface3=INTERFACE
|NotInGit=REASON
}}
  • FILENAME は、拡張子も含むファイル名です。
    • 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 はファイルへのパスです。先頭に / を付けず、末尾には / を付けてください。 ルート ディレクトリにあるファイルの場合は空欄のままにしてください。
  • class 引数はすべて省略可能です。指定すると、生成済みの説明文書にリンクされます。 CLASS は、URL 内で使用されるため、クラス名にすべきです。 例:「Parser」を指定すると「classParser.html」へのリンクが生成されます。 このテンプレートではクラスのパラメーターを class1-class6 の 6 個まで指定できます。
  • INTERFACE も同様です。 このテンプレートではインターフェイスのパラメーターを 4 個まで指定できます。
  • NotInGit 引数は省略可能です。何らかの理由でファイルが Git 内にない場合のみ使用してください (作者は、これには LocalSettings.php のみが該当すると考えます)。 REASON は、基礎情報ボックス内に表示される理由です。 NotInGit は大文字・小文字が区別されることにご注意ください!

このテンプレートは、マニュアルで広範囲にわたって使用されています。

{{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=インストール時に作成される
}}

関連項目

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