Manual:RedirectLookup.php
MediaWiki file: RedirectLookup.php | |
---|---|
Location: | includes\page\ |
Source code: | master • 1.43.0 • 1.42.4 • 1.39.11 |
Classes: | MediaWiki\Page\RedirectLookup |
Interface for a service resolving a wiki page redirect. Available since 1.38. It defines one method, getRedirectTarget().
Instantiation
edit$redirectStore = MediaWikiServices::getInstance()->getRedirectStore();
$target = $redirectStore->getRedirectTarget($page);
$title = Title::newFromLinkTarget($target);