MobileFrontend
Mobile optimised frontend for MediaWiki
Loading...
Searching...
No Matches
MobileFrontend\Features\FeaturesManager Class Reference

Public Member Functions

 __construct (UserModes $userModes)
 
 useHookToRegisterExtensionOrSkinFeatures ()
 Allow other extensions to register features.
 
 registerFeature (IFeature $feature)
 Register a new MobileFronted feature.
 
 getAvailableForMode (IUserMode $mode)
 List all features that are available in given mode.
 
 getFeature ( $id)
 Get feature.
 
 getMode ( $modeIdentifier)
 Retrieve the current mode.
 

Constructor & Destructor Documentation

◆ __construct()

MobileFrontend\Features\FeaturesManager::__construct ( UserModes $userModes)
Parameters
UserModes$userModes

Member Function Documentation

◆ getAvailableForMode()

MobileFrontend\Features\FeaturesManager::getAvailableForMode ( IUserMode $mode)

List all features that are available in given mode.

This function do not check if user enabled given mode.

Parameters
IUserMode$modeUser Mode
Returns
array<IFeature>

◆ getFeature()

MobileFrontend\Features\FeaturesManager::getFeature ( $id)

Get feature.

Parameters
string$idFeature id
Returns
IFeature

◆ getMode()

MobileFrontend\Features\FeaturesManager::getMode ( $modeIdentifier)

Retrieve the current mode.

Parameters
string$modeIdentifierMode identifier
Returns
IUserMode

◆ registerFeature()

MobileFrontend\Features\FeaturesManager::registerFeature ( IFeature $feature)

Register a new MobileFronted feature.

Parameters
IFeature$featureFeature to register
Exceptions

RuntimeException


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