Manual:Hooks/WatchedItemQueryServiceExtensions

From mediawiki.org
Jump to navigation Jump to search
WatchedItemQueryServiceExtensions
Available from version 1.29.0 (Gerrit change 315521)
Add a WatchedItemQueryServiceExtension
Define function:
public static function onWatchedItemQueryServiceExtensions( &$extensions, WatchedItemQueryService $service ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"WatchedItemQueryServiceExtensions": "MyExtensionHooks::onWatchedItemQueryServiceExtensions"
	}
}
Called from: File(s): watcheditem/WatchedItemQueryService.php
Function(s): getExtensions
Interface: WatchedItemQueryServiceExtensionsHook.php

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

This hook is used to add a WatchedItemQueryServiceExtension.

Hook handlers should add a new item to the $extensions array.

Parameters[edit]

  • WatchedItemQueryServiceExtension &$extensions Add WatchedItemQueryServiceExtension objects to this array.
  • WatchedItemQueryService $watchedItemQueryService Service object.

Return[edit]

Handlers should not return any value.

See also[edit]