MediaWiki REL1_39
MediaWiki\Hook\SpecialRandomGetRandomTitleHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Hook\SpecialRandomGetRandomTitleHook:

Public Member Functions

 onSpecialRandomGetRandomTitle (&$randstr, &$isRedir, &$namespaces, &$extra, &$title)
 This hook is called during the execution of Special:Random,.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "SpecialRandomGetRandomTitle" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 14 of file SpecialRandomGetRandomTitleHook.php.

Member Function Documentation

◆ onSpecialRandomGetRandomTitle()

MediaWiki\Hook\SpecialRandomGetRandomTitleHook::onSpecialRandomGetRandomTitle ( & $randstr,
& $isRedir,
& $namespaces,
& $extra,
& $title )

This hook is called during the execution of Special:Random,.

Use this to change some selection criteria or substitute a different title.

Since
1.35
Parameters
string&$randstrThe random number from wfRandom()
bool&$isRedirBoolean, whether to select a redirect or non-redirect
int[]&$namespacesAn array of namespace indexes to get the title from
array&$extraAn array of extra SQL statements
Title&$titleIf the hook returns false, a Title object to use instead of the result from the normal query
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: