|
const | EXTENSION_NAME = 'popups' |
|
const | LOGGER_CHANNEL = 'popups' |
| Logger channel name.
|
|
const | PREVIEWS_ENABLED = true |
| User preference value for enabled Page Previews.
|
|
const | PREVIEWS_DISABLED = false |
| User preference value for disabled Page Previews.
|
|
const | PREVIEWS_OPTIN_PREFERENCE_NAME = 'popups' |
| User preference key to enable/disable Page Previews.
|
|
const | REFERENCE_PREVIEWS_PREFERENCE_NAME_AFTER_BETA = 'popups-reference-previews' |
| User preference key to enable/disable Reference Previews.
|
|
const | REFERENCE_PREVIEWS_PREFERENCE_NAME = 'popupsreferencepreviews' |
| User preference key to enable/disable Reference Previews.
|
|
◆ __construct()
Popups\PopupsContext::__construct |
( |
Config | $config, |
|
|
ExtensionRegistry | $extensionRegistry, |
|
|
PopupsGadgetsIntegration | $gadgetsIntegration, |
|
|
UserOptionsLookup | $userOptionsLookup ) |
- Parameters
-
Config | $config | Mediawiki configuration |
ExtensionRegistry | $extensionRegistry | MediaWiki extension registry |
PopupsGadgetsIntegration | $gadgetsIntegration | Gadgets integration helper |
UserOptionsLookup | $userOptionsLookup | events |
◆ areDependenciesMet()
Popups\PopupsContext::areDependenciesMet |
( |
| ) |
|
◆ conflictsWithNavPopupsGadget()
Popups\PopupsContext::conflictsWithNavPopupsGadget |
( |
\User | $user | ) |
|
- Parameters
-
\User | $user | User whose gadgets settings are being checked |
- Returns
- bool
◆ conflictsWithRefTooltipsGadget()
Popups\PopupsContext::conflictsWithRefTooltipsGadget |
( |
\User | $user | ) |
|
- Parameters
-
\User | $user | User whose gadgets settings are being checked |
- Returns
- bool
◆ getConfigBitmaskFromUser()
Popups\PopupsContext::getConfigBitmaskFromUser |
( |
\User | $user | ) |
|
- Parameters
-
\User | $user | User whose preferences are checked |
- Returns
- int
◆ getLogger()
Popups\PopupsContext::getLogger |
( |
| ) |
|
Get module logger.
- Returns
- \Psr\Log\LoggerInterface
◆ isReferencePreviewsEnabled()
Popups\PopupsContext::isReferencePreviewsEnabled |
( |
\User | $user | ) |
|
- Parameters
-
\User | $user | User whose preferences are checked |
- Returns
- bool whether or not to show reference previews
◆ isReferencePreviewsInBeta()
Popups\PopupsContext::isReferencePreviewsInBeta |
( |
| ) |
|
- Returns
- bool whether or not reference previews are a beta feature
◆ isTitleExcluded()
Popups\PopupsContext::isTitleExcluded |
( |
| $title | ) |
|
Whether popups code should be shipped to $title.
For example, if 'Special:UserLogin' is excluded, and the user is on 'Special:UserLogin', then the title is considered excluded.
A title is also considered excluded if its root matches one of the page names from the config variable. For example, if 'User:A' is excluded, and the title is 'User:A/b', then this title is considered excluded.
Language specific excluded titles affect all languages. For example, if "Main_Page" is excluded, "Bosh_Sahifa" (which is "Main_Page" in Uzbek) is considered excluded too.
- Parameters
-
Title | $title | title being tested |
- Returns
- bool
◆ shouldSendModuleToUser()
Popups\PopupsContext::shouldSendModuleToUser |
( |
\User | $user | ) |
|
- Parameters
-
\User | $user | User whose preferences are checked |
- Returns
- bool
◆ showPreviewsOptInOnPreferencesPage()
Popups\PopupsContext::showPreviewsOptInOnPreferencesPage |
( |
| ) |
|
Are Page previews visible on User Preferences Page.
- Returns
- bool
◆ REFERENCE_PREVIEWS_PREFERENCE_NAME_AFTER_BETA
const Popups\PopupsContext::REFERENCE_PREVIEWS_PREFERENCE_NAME_AFTER_BETA = 'popups-reference-previews' |
User preference key to enable/disable Reference Previews.
Named "mwe-popups-referencePreviews-enabled" in localStorage for anonymous users.
The documentation for this class was generated from the following file:
- includes/PopupsContext.php