Manual:$wgActions/ja

詳細
通常のページで「action」パラメーターに指定できる値の配列です.

This method of defining custom actions replaces the deprecated hook. For details about how to migrate existing hook code to the class-based approach, see.

構文は以下の通りです:


 * - のサブクラスである指定したクラスを読み込みます
 * - Action のサブクラスであるクラス FooAction を読み込みます
 * - 操作は無効です. エラー メッセージを表示します.

Example
There is a lot you can do with a custom action, and the best method of discovery is to browse the Action, FormAction and FormlessAction classes in the core MediaWiki code (as these are the classes you will be extending) and to look at examples of pages that provide similar function to what you require, either in the core or in stable and well-supported extensions.

The following example covers the most common use-case, namely generating a custom page for the action, possibly with some extra URL arguments.

Register the new action in extension.json (see extension.json schema:

Disable an action
To disable an action just add the following e.g. for the "raw" action to your "LocalSettings.php" file: