한국   대만   중국   일본 
Extension:CentralNotice/Hooks/CentralNoticeCampaignChange - MediaWiki

Extension : CentralNotice/Hooks/CentralNoticeCampaignChange

CentralNoticeCampaignChange
Available from version???? ( Gerrit change 493459 )

Define function:
public
 static
 function
 onCentralNoticeCampaignChange
(
 string
 $action
,
 string
 $time
,
 string
 $campaignName
,
 User
 $user
,
 array
 $settingsBeforeChanges
,
 array
 $settingsAfterChanges
,
 ?
string
 $summary
 )
 {
 ...
 }

Attach hook:
$wgHooks
[
'CentralNoticeCampaignChange'
][]
 =
 'MyExtensionHooks::onCentralNoticeCampaignChange'
;

Called from: File(s): CentralNotice / includes/Campaign.php
Function(s): processAfterCampaignChange

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

This hook cannot be aborted.

Parameters edit

  • $action : A string , which represents an action related to a campaign. This can be either 'created' , 'modified' , or 'removed'
  • $time : A string representing a database timestamp as returned by IDatabase :: timestamp ()
  • $campaignName : A string representing the name of the campaign
  • $user : An instance of User , representing the user causing the change to the campaign
  • $settingsBeforeChanges : An array representing the campaign settings before changes, as returned by Campaign :: processSettingsForHook (a private static method)
  • $settingsAfterChanges : An array representing the campaign settings after changes, as returned by Campaign :: processSettingsForHook (a private static method)
  • $summary : Represents a string if a user gave a change summary, or null if the user did not.