Manual:Hooks/SpecialStatsAddExtra

From mediawiki.org
Jump to navigation Jump to search
SpecialStatsAddExtra
Available from version 1.16.0 (r54516)
Can be used to add extra statistic at the end of Special:Statistics.
Define function:
public static function onSpecialStatsAddExtra( &$extraStats, IContextSource $context ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SpecialStatsAddExtra": "MyExtensionHooks::onSpecialStatsAddExtra"
	}
}
Called from: File(s): SpecialStatistics.php
Interface: SpecialStatsAddExtraHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:SpecialStatsAddExtra extensions.


Details[edit]

  • &$extraStats: Array to save the new stats ( $extraStats['<name of statistic>'] => <value>; )