Vector
Vector is a skin for MediaWiki. Vector has been the default skin on all Wikimedia wikis since 2010.
Loading...
Searching...
No Matches
MediaWiki\Skins\Vector\FeatureManagement\Requirements\UserPreferenceRequirement Class Reference
+ Inheritance diagram for MediaWiki\Skins\Vector\FeatureManagement\Requirements\UserPreferenceRequirement:
+ Collaboration diagram for MediaWiki\Skins\Vector\FeatureManagement\Requirements\UserPreferenceRequirement:

Public Member Functions

 __construct (UserIdentity $user, UserOptionsLookup $userOptionsLookup, string $optionName, string $requirementName, WebRequest $request, Title $title=null)
 This constructor accepts all dependencies needed to determine whether the overridable config is enabled for the current user and request.
 
 getName ()
 @inheritDoc
 
 isPreferenceEnabled ()
 Checks whether the user preference is enabled or not.
 
 isMet ()
 @inheritDoc
 

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Skins\Vector\FeatureManagement\Requirements\UserPreferenceRequirement::__construct ( UserIdentity $user,
UserOptionsLookup $userOptionsLookup,
string $optionName,
string $requirementName,
WebRequest $request,
Title $title = null )

This constructor accepts all dependencies needed to determine whether the overridable config is enabled for the current user and request.

Parameters
UserIdentity$user
UserOptionsLookup$userOptionsLookup
string$optionNameThe name of the user preference.
string$requirementNameThe name of the requirement presented to FeatureManager.
WebRequest$request
Title | null$title

Member Function Documentation

◆ getName()

MediaWiki\Skins\Vector\FeatureManagement\Requirements\UserPreferenceRequirement::getName ( )

◆ isMet()

MediaWiki\Skins\Vector\FeatureManagement\Requirements\UserPreferenceRequirement::isMet ( )

◆ isPreferenceEnabled()

MediaWiki\Skins\Vector\FeatureManagement\Requirements\UserPreferenceRequirement::isPreferenceEnabled ( )

Checks whether the user preference is enabled or not.

Returns true if enabled AND title is not null.


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