MediaWiki
1.32.5
|
Static Public Member Functions | |
static | doEventLogging ( $action, $article, $data=[]) |
Log stuff to EventLogging's Schema:Edit - see https://meta.wikimedia.org/wiki/Schema:Edit If you don't have EventLogging installed, does nothing. More... | |
static | editPageAttemptSave (EditPage $editPage) |
This is attached to the MediaWiki 'EditPage::attemptSave' hook. More... | |
static | editPageAttemptSaveAfter (EditPage $editPage, Status $status) |
This is attached to the MediaWiki 'EditPage::attemptSave:after' hook. More... | |
static | EditPageBeforeEditToolbar (&$toolbar) |
EditPageBeforeEditToolbar hook. More... | |
static | editPageShowEditFormFields (EditPage $editPage, OutputPage $outputPage) |
EditPage::showEditForm:fields hook. More... | |
static | editPageShowEditFormInitial (EditPage $editPage, OutputPage $outputPage) |
EditPage::showEditForm:initial hook. More... | |
static | getPreferences ( $user, &$defaultPreferences) |
GetPreferences hook. More... | |
static | makeGlobalVariablesScript (&$vars) |
MakeGlobalVariablesScript hook. More... | |
static | resourceLoaderGetConfigVars (&$vars) |
static | resourceLoaderTestModules (&$testModules, &$resourceLoader) |
ResourceLoaderTestModules hook. More... | |
Static Private Member Functions | |
static | getEditingStatsId () |
Gets a 32 character alphanumeric random string to be used for stats. More... | |
static | getMagicWords (&$vars) |
Expose useful magic words which are used by the wikieditor toolbar. More... | |
Static Private Attributes | |
static | $statsId = false |
Definition at line 11 of file WikiEditorHooks.php.
|
static |
Log stuff to EventLogging's Schema:Edit - see https://meta.wikimedia.org/wiki/Schema:Edit 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 27 of file WikiEditorHooks.php.
References $article, $title, $user, $wgVersion, ContextSource\getContext(), ExtensionRegistry\getInstance(), and ContextSource\getTitle().
Referenced by editPageAttemptSave(), editPageAttemptSaveAfter(), and editPageShowEditFormInitial().
|
static |
This is attached to the MediaWiki 'EditPage::attemptSave' hook.
EditPage | $editPage |
Definition at line 281 of file WikiEditorHooks.php.
References $article, $request, doEventLogging(), EditPage\getArticle(), and ContextSource\getContext().
This is attached to the MediaWiki 'EditPage::attemptSave:after' hook.
Definition at line 302 of file WikiEditorHooks.php.
References $article, $request, EditPage\AS_ARTICLE_WAS_DELETED, EditPage\AS_CONFLICT_DETECTED, doEventLogging(), EditPage\getArticle(), and ContextSource\getContext().
|
static |
EditPageBeforeEditToolbar hook.
Disable the old toolbar if the new one is enabled
string | &$toolbar |
Definition at line 156 of file WikiEditorHooks.php.
|
static |
EditPage::showEditForm:fields hook.
Adds the event fields to the edit form
Definition at line 123 of file WikiEditorHooks.php.
References $req, CONTENT_MODEL_WIKITEXT, Xml\element(), and getEditingStatsId().
|
static |
EditPage::showEditForm:initial hook.
Adds the modules to the edit form
Definition at line 72 of file WikiEditorHooks.php.
References $article, $request, $user, CONTENT_MODEL_WIKITEXT, doEventLogging(), EditPage\getArticle(), ContextSource\getContext(), getEditingStatsId(), and ExtensionRegistry\getInstance().
|
staticprivate |
Gets a 32 character alphanumeric random string to be used for stats.
Definition at line 268 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.
array | &$vars |
Definition at line 238 of file WikiEditorHooks.php.
References $magicWords, $name, $vars, as, class, and MagicWord\get().
Referenced by resourceLoaderGetConfigVars().
|
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 176 of file WikiEditorHooks.php.
|
static |
MakeGlobalVariablesScript hook.
Adds enabled/disabled switches for WikiEditor modules
array | &$vars |
Definition at line 227 of file WikiEditorHooks.php.
References $vars.
|
static |
array | &$vars |
Definition at line 191 of file WikiEditorHooks.php.
References $vars, getMagicWords(), and wfMessage().
|
static |
ResourceLoaderTestModules hook.
Registers JavaScript test modules
array | &$testModules | array of javascript testing modules. 'qunit' is fed using tests/qunit/QUnitTestResources.php. |
ResourceLoader | &$resourceLoader |
Definition at line 210 of file WikiEditorHooks.php.
|
staticprivate |
Definition at line 14 of file WikiEditorHooks.php.
Referenced by getEditingStatsId().