Manual:フック/AutopromoteCondition

From mediawiki.org
This page is a translated version of the page Manual:Hooks/AutopromoteCondition and the translation is 80% complete.
AutopromoteCondition
バージョン 1.12.0 から利用可能
利用者の自動昇格の条件をチェックする。
関数の定義:
public static function onAutopromoteCondition( $type, $args, $user, &$result ) { ... }
フックのアタッチ: extension.json 内:
{
	"Hooks": {
		"AutopromoteCondition": "MediaWiki\\Extension\\MyExtension\\Hooks::onAutopromoteCondition"
	}
}
呼び出し元: ファイル: Autopromote.php
インターフェイス: AutopromoteConditionHook.php

フックの設定についての詳細情報は Manual:フック を参照してください。
このフックを使用する拡張機能の例については、Category:AutopromoteCondition extensions/ja を参照してください。

詳細

This hook only runs if the condition type does not match any of those already defined as possible conditions. If you are writing an extension that declares a constant for a new condition type, note that values 0 through 9 have already been taken by APCOND_EDITCOUNT, APCOND_AGE, etc.

  • $type - 条件の種類
  • $args - 引数
  • $user - 利用者
  • &$result - 自動昇格の条件のチェックの結果。 既定値は null です。null のままの場合は、例外をスローします ("Unrecognized condition [$type] for autopromotion")