MediaWiki REL1_35
MediaWiki\Hook\SpecialRandomGetRandomTitleHook Interface Reference

Stable to implement. 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

Stable to implement.

Definition at line 11 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: