Manual:Hooks/AutopromoteCondition/ja

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
AutopromoteCondition
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
利用者の自動昇格の条件をチェックする。
<translate> Define function:</translate>
public static function onAutopromoteCondition( $type, $args, $user, &$result ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"AutopromoteCondition": "MediaWiki\\Extension\\MyExtension\\Hooks::onAutopromoteCondition"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> Autopromote.php
<translate> Interface:</translate> AutopromoteConditionHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:フック </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:AutopromoteCondition extensions/ja</tvar>.</translate>

詳細

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")