Manual:Hooks/SpecialWatchlistQuery

From Linux Web Expert

SpecialWatchlistQuery
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
<translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 463881)</tvar></translate>
Called when building sql query for Special:Watchlist
<translate> Define function:</translate>
public static function onSpecialWatchlistQuery( array &$conds, array &$tables, array &$joinConds, array &$fields, FormOptions $opts ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"SpecialWatchlistQuery": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialWatchlistQuery"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specials/SpecialWatchlist.php
<translate> Interface:</translate> SpecialWatchlistQueryHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:SpecialWatchlistQuery extensions</tvar>.</translate>


Details

  • &$conds: array of WHERE conditionals for query
  • &$tables: array of tables to be queried
  • &$joinConds: JOIN conditions for the tables
  • &$fields: array of query fields
  • $opts: FormOptions