3 namespace MediaWiki\Page\Hook
;
5 use MediaWiki\Parser\ParserOutput
;
6 use MediaWiki\Title\Title
;
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "OpportunisticLinksUpdate" to register handlers implementing this interface.
13 * @stable to implement
16 interface OpportunisticLinksUpdateHook
{
18 * This hook is called by WikiPage::triggerOpportunisticLinksUpdate
19 * when a page view triggers a re-rendering of the page. This may happen
20 * particularly if the parser cache is split by user language, and no cached
21 * rendering of the page exists in the user's language. The hook is called
22 * before checking whether page_links_updated indicates that the links are up
27 * @param WikiPage $page WikiPage that was rendered
28 * @param Title $title Title of the rendered page
29 * @param ParserOutput $parserOutput ParserOutput resulting from rendering the page
30 * @return bool|void True or no return value to continue, or false to abort
31 * triggerOpportunisticLinksUpdate() without triggering any updates
33 public function onOpportunisticLinksUpdate( $page, $title, $parserOutput );