Jump to content

Extension:QuickSurveys/Hooks/QuickSurveysEnabled

From mediawiki.org
QuickSurveysEnabled
Available from version ???
Allows extensions to register surveys.
Define function:
public static function onQuickSurveysEnabled( &$surveys ) { ... }
Attach hook:
$wgHooks['QuickSurveysEnabled'][] = 'MyExtensionHooks::onQuickSurveysEnabled';
Called from:
File(s): QuickSurveys / extensions/QuickSurveys/ServiceWiring.php

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

Details

[edit]
  • array &$surveys: the surveys to add to the page.

This hook should work in all skins. Just append to the &$surveys variable any surveys you'd like to register. Surveys added here will be discarded if they have names similar to surveys that have already been defined in the variable $wgQuickSurveysConfig.

For information on the format of the items of the array please see Extension:QuickSurveys.