Allow reset of global services (redux).
[lhc/web/wiklou.git] / docs / hooks.txt
index a431f1b..a7092ec 100644 (file)
@@ -376,6 +376,7 @@ $user: Current user
 'APIEditBeforeSave': Before saving a page with api.php?action=edit, after
 processing request parameters. Return false to let the request fail, returning
 an error message or an <edit result="Failure"> tag if $resultArr was filled.
+Unlike for example 'EditFilterMergedContent' this also being run on undo.
 $editPage: the EditPage object
 $text: the new text of the article (has yet to be saved)
 &$resultArr: data in this array will be added to the API result
@@ -1996,6 +1997,12 @@ $user: $wgUser
 $request: $wgRequest
 $mediaWiki: The $mediawiki object
 
+'MediaWikiServices': Called when a global MediaWikiServices instance is
+initialized. Extensions may use this to define, replace, or wrap services.
+However, the preferred way to define a new service is
+the $wgServiceWiringFiles array.
+$services: MediaWikiServices
+
 'MessageCache::get': When fetching a message. Can be used to override the key
 for customisations. Given and returned message key must be in special format:
 1) first letter must be in lower case according to the content language.
@@ -2854,6 +2861,7 @@ $special: the SpecialPage object
 $subPage: the subpage string or null if no subpage was specified
 
 'SpecialPageBeforeExecute': Called before SpecialPage::execute.
+Return false to prevent execution.
 $special: the SpecialPage object
 $subPage: the subpage string or null if no subpage was specified