Merge "mediawiki.api: Remove console warning for legacy token type"
[mediawiki.git] / includes / skins / Hook / SkinEditSectionLinksHook.php
blob1c1e8e8159f13c0b19149e4aa5d5a8e2975a3343
1 <?php
3 namespace MediaWiki\Hook;
5 use MediaWiki\Language\Language;
6 use MediaWiki\Title\Title;
7 use Skin;
9 /**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "SkinEditSectionLinks" to register handlers implementing this interface.
13 * @stable to implement
14 * @ingroup Hooks
16 interface SkinEditSectionLinksHook {
17 /**
18 * Use this hook to modify section edit links.
20 * @since 1.35
22 * @param Skin $skin Skin object rendering the UI
23 * @param Title $title Title being linked to (may not be the same as the page title,
24 * if the section is included from a template)
25 * @param string $section Designation of the section being pointed to, to be included in
26 * the link, like "&section=$section"
27 * @param string $sectionTitle Section title, used in the default tooltip. Escape before using.
28 * By default, this is wrapped in the 'editsectionhint' message.
29 * @param array &$result Array containing all link detail arrays. Each link detail array should
30 * contain the following keys:
31 * - `targetTitle`: Target Title object
32 * - `text`: String for the text
33 * - `attribs`: Array of attributes
34 * - `query`: Array of query parameters to add to the URL
35 * @param Language $lang Language to use for the link in the wfMessage function
36 * @return bool|void True or no return value to continue or false to abort
38 public function onSkinEditSectionLinks( $skin, $title, $section, $sectionTitle,
39 &$result, $lang