MediaWiki  1.23.2
ResourceLoaderUserOptionsModule Class Reference

Module for user preference customizations. More...

Inheritance diagram for ResourceLoaderUserOptionsModule:
Collaboration diagram for ResourceLoaderUserOptionsModule:

Public Member Functions

 getGroup ()
 
 getModifiedTime (ResourceLoaderContext $context)
 
 getScript (ResourceLoaderContext $context)
 
 supportsURLLoading ()
 
- Public Member Functions inherited from ResourceLoaderModule
 getDefinitionMtime (ResourceLoaderContext $context)
 Helper method for calculating when this module's definition summary was last changed. More...
 
 getDefinitionSummary (ResourceLoaderContext $context)
 Get the definition summary for this module. More...
 
 getDependencies ()
 Get a list of modules this module depends on. More...
 
 getFileDependencies ( $skin)
 Get the files this module depends on indirectly for a given skin. More...
 
 getFlip ( $context)
 
 getHashMtime (ResourceLoaderContext $context)
 Helper method for calculating when the module's hash (if it has one) changed. More...
 
 getLoaderScript ()
 Get the loader JS for this module, if set. More...
 
 getMessages ()
 Get the messages needed for this module. More...
 
 getModifiedHash (ResourceLoaderContext $context)
 Get the hash for whatever this module may contain. More...
 
 getMsgBlobMtime ( $lang)
 Get the last modification timestamp of the message blob for this module in a given language. More...
 
 getName ()
 Get this module's name. More...
 
 getOrigin ()
 Get this module's origin. More...
 
 getPosition ()
 Where on the HTML page should this module's JS be loaded? More...
 
 getScriptURLsForDebug (ResourceLoaderContext $context)
 Get the URL or URLs to load for this module's JS in debug mode. More...
 
 getSource ()
 Get the origin of this module. More...
 
 getStyles (ResourceLoaderContext $context)
 Get all CSS for this module for a given skin. More...
 
 getStyleURLsForDebug (ResourceLoaderContext $context)
 Get the URL or URLs to load for this module's CSS in debug mode. More...
 
 getTargets ()
 Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']. More...
 
 isKnownEmpty (ResourceLoaderContext $context)
 Check whether this module is known to be empty. More...
 
 isRaw ()
 Whether this module's JS expects to work without the client-side ResourceLoader module. More...
 
 setFileDependencies ( $skin, $deps)
 Set preloaded file dependency information. More...
 
 setMsgBlobMtime ( $lang, $mtime)
 Set a preloaded message blob last modification timestamp. More...
 
 setName ( $name)
 Set this module's name. More...
 
 setOrigin ( $origin)
 Set this module's origin. More...
 

Protected Attributes

 $modifiedTime = array()
 
 $origin = self::ORIGIN_CORE_INDIVIDUAL
 
 $targets = array( 'desktop', 'mobile' )
 
- Protected Attributes inherited from ResourceLoaderModule
 $fileDeps = array()
 
 $msgBlobMtime = array()
 
 $name = null
 
 $origin = self::ORIGIN_CORE_SITEWIDE
 
 $targets = array( 'desktop' )
 

Additional Inherited Members

- Public Attributes inherited from ResourceLoaderModule
const ORIGIN_ALL = 10
 
const ORIGIN_CORE_INDIVIDUAL = 2
 
const ORIGIN_CORE_SITEWIDE = 1
 
const ORIGIN_USER_INDIVIDUAL = 4
 
const ORIGIN_USER_SITEWIDE = 3
 
const TYPE_COMBINED = 'combined'
 
const TYPE_MESSAGES = 'messages'
 
const TYPE_SCRIPTS = 'scripts'
 
const TYPE_STYLES = 'styles'
 
- Protected Member Functions inherited from ResourceLoaderModule
 validateScriptFile ( $fileName, $contents)
 Validate a given script file; if valid returns the original source. More...
 
- Static Protected Member Functions inherited from ResourceLoaderModule
static javaScriptParser ()
 
static safeFilemtime ( $filename)
 Safe version of filemtime(), which doesn't throw a PHP warning if the file doesn't exist but returns 1 instead. More...
 

Detailed Description

Module for user preference customizations.

Definition at line 28 of file ResourceLoaderUserOptionsModule.php.

Member Function Documentation

◆ getGroup()

ResourceLoaderUserOptionsModule::getGroup ( )
Returns
string

Reimplemented from ResourceLoaderModule.

Definition at line 76 of file ResourceLoaderUserOptionsModule.php.

◆ getModifiedTime()

ResourceLoaderUserOptionsModule::getModifiedTime ( ResourceLoaderContext  $context)
Parameters
$contextResourceLoaderContext
Returns
array|int|Mixed

Reimplemented from ResourceLoaderModule.

Definition at line 44 of file ResourceLoaderUserOptionsModule.php.

References $hash, $wgUser, ResourceLoaderContext\getHash(), global, TS_UNIX, and wfTimestamp().

◆ getScript()

ResourceLoaderUserOptionsModule::getScript ( ResourceLoaderContext  $context)
Parameters
$contextResourceLoaderContext
Returns
string

Reimplemented from ResourceLoaderModule.

Definition at line 58 of file ResourceLoaderUserOptionsModule.php.

References $wgUser, array(), Xml\encodeJsCall(), global, and ResourceLoader\inDebugMode().

◆ supportsURLLoading()

ResourceLoaderUserOptionsModule::supportsURLLoading ( )
Returns
bool

Reimplemented from ResourceLoaderModule.

Definition at line 69 of file ResourceLoaderUserOptionsModule.php.

Member Data Documentation

◆ $modifiedTime

ResourceLoaderUserOptionsModule::$modifiedTime = array()
protected

Definition at line 32 of file ResourceLoaderUserOptionsModule.php.

◆ $origin

ResourceLoaderUserOptionsModule::$origin = self::ORIGIN_CORE_INDIVIDUAL
protected

Definition at line 34 of file ResourceLoaderUserOptionsModule.php.

◆ $targets

ResourceLoaderUserOptionsModule::$targets = array( 'desktop', 'mobile' )
protected

Definition at line 36 of file ResourceLoaderUserOptionsModule.php.


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