MediaWiki REL1_34
|
Static Public Member Functions | |
static | doEventLogging ( $action, $article, $data=[]) |
Log stuff to EventLogging's Schema:EditAttemptStep - see https://meta.wikimedia.org/wiki/Schema:EditAttemptStep If you don't have EventLogging installed, does nothing. | |
static | editPageAttemptSave (EditPage $editPage) |
This is attached to the MediaWiki 'EditPage::attemptSave' hook. | |
static | editPageAttemptSaveAfter (EditPage $editPage, Status $status) |
This is attached to the MediaWiki 'EditPage::attemptSave:after' hook. | |
static | EditPageBeforeEditToolbar (&$toolbar) |
EditPageBeforeEditToolbar hook. | |
static | editPageShowEditFormFields (EditPage $editPage, OutputPage $outputPage) |
EditPage::showEditForm:fields hook. | |
static | editPageShowEditFormInitial (EditPage $editPage, OutputPage $outputPage) |
EditPage::showEditForm:initial hook. | |
static | getModuleData (ResourceLoaderContext $context, Config $config) |
static | getModuleDataSummary (ResourceLoaderContext $context, Config $config) |
static | getPreferences ( $user, &$defaultPreferences) |
GetPreferences hook. | |
Static Private Member Functions | |
static | getEditingStatsId () |
Gets a 32 character alphanumeric random string to be used for stats. | |
static | getMagicWords () |
Expose useful magic words which are used by the wikieditor toolbar. | |
static | getSignatureMessage (MessageLocalizer $ml, $raw=false) |
Static Private Attributes | |
static | $statsId = false |
Definition at line 11 of file WikiEditorHooks.php.
|
static |
Log stuff to EventLogging's Schema:EditAttemptStep - see https://meta.wikimedia.org/wiki/Schema:EditAttemptStep If you don't have EventLogging installed, does nothing.
string | $action | |
Article | $article | Which article (with full context, page, title, etc.) |
array | $data | Data to log for this action |
Definition at line 28 of file WikiEditorHooks.php.
References $title, and $wgVersion.
Referenced by editPageAttemptSave(), editPageAttemptSaveAfter(), and editPageShowEditFormInitial().
|
static |
This is attached to the MediaWiki 'EditPage::attemptSave' hook.
EditPage | $editPage |
Definition at line 261 of file WikiEditorHooks.php.
References doEventLogging(), and EditPage\getArticle().
This is attached to the MediaWiki 'EditPage::attemptSave:after' hook.
Definition at line 279 of file WikiEditorHooks.php.
References EditPage\AS_ARTICLE_WAS_DELETED, EditPage\AS_CONFLICT_DETECTED, doEventLogging(), EditPage\getArticle(), Status\getErrorsArray(), and StatusValue\isOK().
|
static |
EditPageBeforeEditToolbar hook.
Disable the old toolbar if the new one is enabled
string | &$toolbar |
Definition at line 158 of file WikiEditorHooks.php.
|
static |
EditPage::showEditForm:fields hook.
Adds the event fields to the edit form
EditPage | $editPage | the current EditPage object. |
OutputPage | $outputPage | object. |
Definition at line 126 of file WikiEditorHooks.php.
References OutputPage\addHTML(), CONTENT_MODEL_WIKITEXT, getEditingStatsId(), and ContextSource\getRequest().
|
static |
EditPage::showEditForm:initial hook.
Adds the modules to the edit form
EditPage | $editPage | the current EditPage object. |
OutputPage | $outputPage | object. |
Definition at line 78 of file WikiEditorHooks.php.
References OutputPage\addModules(), OutputPage\addModuleStyles(), CONTENT_MODEL_WIKITEXT, doEventLogging(), EditPage\getArticle(), and getEditingStatsId().
|
staticprivate |
Gets a 32 character alphanumeric random string to be used for stats.
Definition at line 249 of file WikiEditorHooks.php.
References $statsId, and MWCryptRand\generateHex().
Referenced by editPageShowEditFormFields(), and editPageShowEditFormInitial().
|
staticprivate |
Expose useful magic words which are used by the wikieditor toolbar.
Definition at line 220 of file WikiEditorHooks.php.
References $magicWords, and MagicWord\get().
Referenced by getModuleData(), and getModuleDataSummary().
|
static |
ResourceLoaderContext | $context | |
Config | $config |
Definition at line 192 of file WikiEditorHooks.php.
References $context, getMagicWords(), and getSignatureMessage().
|
static |
ResourceLoaderContext | $context | |
Config | $config |
Definition at line 205 of file WikiEditorHooks.php.
References $context, getMagicWords(), and getSignatureMessage().
|
static |
GetPreferences hook.
Adds WikiEditor-related items to the preferences
User | $user | current user |
array | &$defaultPreferences | list of default user preference controls |
Definition at line 177 of file WikiEditorHooks.php.
|
staticprivate |
Definition at line 212 of file WikiEditorHooks.php.
References MessageLocalizer\msg().
Referenced by getModuleData(), and getModuleDataSummary().
|
staticprivate |
Definition at line 14 of file WikiEditorHooks.php.
Referenced by getEditingStatsId().