Manual:Hooks/ApiQueryWatchlistPrepareWatchedItemQueryServiceOptions

From MediaWiki.org
Jump to navigation Jump to search
ApiQueryWatchlistPrepareWatchedItemQueryServiceOptions
Available from version 1.29.0 (Gerrit change 315521)
Populate the options to be passed from ApiQueryWatchlist to WatchedItemQueryService.
Define function:
public static function onApiQueryWatchlistPrepareWatchedItemQueryServiceOptions( $module, $params, &$options ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ApiQueryWatchlistPrepareWatchedItemQueryServiceOptions": "MyExtensionHooks::onApiQueryWatchlistPrepareWatchedItemQueryServiceOptions"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ApiQueryWatchlistPrepareWatchedItemQueryServiceOptions'][] = 'MyExtensionHooks::onApiQueryWatchlistPrepareWatchedItemQueryServiceOptions';
Called from:File(s): ApiQueryWatchlist.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ApiQueryWatchlistPrepareWatchedItemQueryServiceOptions extensions.