Manual:Hooks/ShortPagesQuery

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.
ShortPagesQuery
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 262680)</tvar></translate>
Allow extensions to modify the query used by Special:ShortPages.
<translate> Define function:</translate>
public static function onShortPagesQuery( array &$tables, array &$conds, array &$joinConds, array &$options ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ShortPagesQuery": "MediaWiki\\Extension\\MyExtension\\Hooks::onShortPagesQuery"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specials/SpecialShortpages.php
<translate> Function(s):</translate> getQueryInfo
<translate> Interface:</translate> ShortPagesQueryHook.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:ShortPagesQuery extensions</tvar>.</translate>


Details

  • &$tables: Array of tables to join in the query
  • &$conds: Array of conditions for the query
  • &$joinConds: Array of join conditions for the query
  • &$options: Array of options for the query