Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Hook;
4
5use Language;
6use MediaWiki\Title\Title;
7use Skin;
8
9/**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "SkinEditSectionLinks" to register handlers implementing this interface.
12 *
13 * @stable to implement
14 * @ingroup Hooks
15 */
16interface SkinEditSectionLinksHook {
17    /**
18     * Use this hook to modify section edit links.
19     *
20     * @since 1.35
21     *
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
37     */
38    public function onSkinEditSectionLinks( $skin, $title, $section, $sectionTitle,
39        &$result, $lang
40    );
41}