MediaWiki  master
MediaWiki\Hook\BeforePageRedirectHook Interface Reference

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

Inheritance diagram for MediaWiki\Hook\BeforePageRedirectHook:

Public Member Functions

 onBeforePageRedirect ( $out, &$redirect, &$code)
 This hook is called prior to sending an HTTP redirect. More...
 

Detailed Description

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

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

Stable to implement

Definition at line 14 of file BeforePageRedirectHook.php.

Member Function Documentation

◆ onBeforePageRedirect()

MediaWiki\Hook\BeforePageRedirectHook::onBeforePageRedirect (   $out,
$redirect,
$code 
)

This hook is called prior to sending an HTTP redirect.

Gives a chance to override how the redirect is output by modifying, or by returning false and taking over the output.

Since
1.35
Parameters
OutputPage$out
string&$redirectURL, modifiable
int&$codeHTTP code (eg '301' or '302'), modifiable
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: