BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
MultimediaViewerHooks Class Reference

Static Public Member Functions

static onUserGetDefaultOptions (&$defaultOptions)
 
static onExtensionFunctions ()
 
static onEventLoggingRegisterSchemas (array &$schemas)
 
static getModulesForArticle (&$out, &$skin)
 
static getModulesForCategory (&$catPage)
 
static getBetaPreferences ($user, &$prefs)
 
static getPreferences ($user, &$prefs)
 
static resourceLoaderGetConfigVars (&$vars)
 
static makeGlobalVariablesScript (&$vars, OutputPage $out)
 
static getTestModules (array &$testModules, ResourceLoader &$resourceLoader)
 
static thumbnailBeforeProduceHTML (ThumbnailImage $thumbnail, array &$attribs, &$linkAttribs)
 

Static Protected Member Functions

static shouldHandleClicks ($user)
 
static getModules (&$out)
 

Static Protected Attributes

static $infoLink
 
static $discussionLink
 
static $helpLink = '//mediawiki.org/wiki/Special:MyLanguage/Help:Extension:Media_Viewer'
 

Member Function Documentation

static MultimediaViewerHooks::getModules ( $out)
staticprotected

Handler for all places where we add the modules Could be on article pages or on Category pages

Parameters
OutputPage$out
Returns
bool
static MultimediaViewerHooks::getModulesForArticle ( $out,
$skin 
)
static

Handler for BeforePageDisplay hook Add JavaScript to the page when an image is on it and the user has enabled the feature if BetaFeatures is installed

Parameters
OutputPage$out
Skin$skin
Returns
bool
static MultimediaViewerHooks::getModulesForCategory ( $catPage)
static

Handler for CategoryPageView hook Add JavaScript to the page if there are images in the category

Parameters
CategoryPage$catPage
Returns
bool
static MultimediaViewerHooks::getTestModules ( array &  $testModules,
ResourceLoader $resourceLoader 
)
static

Get modules for testing our JavaScript

Parameters
array$testModules
ResourceLoader&$resourceLoader
Returns
bool
static MultimediaViewerHooks::makeGlobalVariablesScript ( $vars,
OutputPage  $out 
)
static

Export variables which depend on the current user

Parameters
$vars
OutputPage$out
static MultimediaViewerHooks::resourceLoaderGetConfigVars ( $vars)
static

Export variables used in both PHP and JS to keep DRY

Parameters
array$vars
Returns
bool
static MultimediaViewerHooks::shouldHandleClicks (   $user)
staticprotected

Checks the context for whether to load the viewer.

Parameters
User$user
Returns
bool
static MultimediaViewerHooks::thumbnailBeforeProduceHTML ( ThumbnailImage  $thumbnail,
array &  $attribs,
$linkAttribs 
)
static

Modify thumbnail DOM

Parameters
ThumbnailImage$thumbnail
array$attribsAttributes of the element
array | bool$linkAttribsAttributes of the wrapping element

Member Data Documentation

MultimediaViewerHooks::$discussionLink
staticprotected
Initial value:
=
'//mediawiki.org/wiki/Special:MyLanguage/Extension_talk:Media_Viewer/About'

Link to a page where this module can be discussed

MultimediaViewerHooks::$helpLink = '//mediawiki.org/wiki/Special:MyLanguage/Help:Extension:Media_Viewer'
staticprotected

Link to help about this module

MultimediaViewerHooks::$infoLink
staticprotected
Initial value:
=
'//mediawiki.org/wiki/Special:MyLanguage/Extension:Media_Viewer/About'

Link to more information about this module


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