| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Context\IContextSource; |
| 6 | |
| 7 | /** |
| 8 | * This is a hook handler interface, see docs/Hooks.md. |
| 9 | * Use the hook name "SpecialStatsAddExtra" to register handlers implementing this interface. |
| 10 | * |
| 11 | * @stable to implement |
| 12 | * @ingroup Hooks |
| 13 | */ |
| 14 | interface SpecialStatsAddExtraHook { |
| 15 | /** |
| 16 | * Use this hook to add extra statistics at the end of Special:Statistics. |
| 17 | * |
| 18 | * @since 1.35 |
| 19 | * |
| 20 | * @param array &$extraStats Array to save the new stats |
| 21 | * $extraStats['<name of statistic>'] => <value>; |
| 22 | * <value> can be an array with the keys "name" and "number": |
| 23 | * "name" is the HTML to be displayed in the name column |
| 24 | * "number" is the number to be displayed. |
| 25 | * or, <value> can be the number to be displayed and <name> is the |
| 26 | * message key to use in the name column, |
| 27 | * @param IContextSource $context |
| 28 | * @return bool|void True or no return value to continue or false to abort |
| 29 | */ |
| 30 | public function onSpecialStatsAddExtra( &$extraStats, $context ); |
| 31 | } |