MobileFrontend
Mobile optimised frontend for MediaWiki
Loading...
Searching...
No Matches
MobileFrontendEditorHooks Class Reference
+ Inheritance diagram for MobileFrontendEditorHooks:
+ Collaboration diagram for MobileFrontendEditorHooks:

Public Member Functions

 onCustomEditor ( $article, $user)
 Decide whether to bother showing the wikitext editor at all.
 

Static Public Member Functions

static getContentLanguageMessages (Context $context, Config $config, array $messagesKeys=[])
 Return messages in content language, for use in a ResourceLoader module.
 
static getResourceLoaderMFConfigVars ()
 Generate config for usage inside MobileFrontend This should be used for variables which:
 

Member Function Documentation

◆ getContentLanguageMessages()

static MobileFrontendEditorHooks::getContentLanguageMessages ( Context $context,
Config $config,
array $messagesKeys = [] )
static

Return messages in content language, for use in a ResourceLoader module.

Parameters
Context$context
Config$config
array$messagesKeys
Returns
array

◆ getResourceLoaderMFConfigVars()

static MobileFrontendEditorHooks::getResourceLoaderMFConfigVars ( )
static

Generate config for usage inside MobileFrontend This should be used for variables which:

  • vary with the html
  • variables that should work cross skin including anonymous users
  • used for both, stable and beta mode (don't use MobileContext::isBetaGroupMember in this function - T127860)
Returns
array

◆ onCustomEditor()

MobileFrontendEditorHooks::onCustomEditor ( $article,
$user )

Decide whether to bother showing the wikitext editor at all.

If not, we expect the editor initialisation JS to activate.

Parameters
Article$articleThe article being viewed.
User$userThe user-specific settings.
Returns
bool Whether to show the wikitext editor or not.

The documentation for this class was generated from the following file: