mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-13 17:57:06 +00:00
Add Article Tools feature flag
Bug: T306609 Change-Id: Ia40af4e48c006aeceebd3879ff0aaecbe1b200d4
This commit is contained in:
parent
8cd41a8c64
commit
e7944de81c
|
@ -225,6 +225,21 @@ final class Constants {
|
||||||
*/
|
*/
|
||||||
public const CONFIG_KEY_VISUAL_ENHANCEMENTS = 'VectorVisualEnhancementNext';
|
public const CONFIG_KEY_VISUAL_ENHANCEMENTS = 'VectorVisualEnhancementNext';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public const CONFIG_ARTICLE_TOOLS = 'VectorArticleTools';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public const REQUIREMENT_ARTICLE_TOOLS = 'ArticleTools';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public const FEATURE_ARTICLE_TOOLS = 'ArticleTools';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is for namespacing constants only. Forbid construction.
|
* This class is for namespacing constants only. Forbid construction.
|
||||||
* @throws FatalError
|
* @throws FatalError
|
||||||
|
|
|
@ -221,6 +221,26 @@ return [
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Feature: Article tools menu
|
||||||
|
// ================================
|
||||||
|
$featureManager->registerRequirement(
|
||||||
|
new OverridableConfigRequirement(
|
||||||
|
$services->getMainConfig(),
|
||||||
|
$context->getUser(),
|
||||||
|
$context->getRequest(),
|
||||||
|
null,
|
||||||
|
Constants::CONFIG_ARTICLE_TOOLS,
|
||||||
|
Constants::REQUIREMENT_ARTICLE_TOOLS
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$featureManager->registerFeature(
|
||||||
|
Constants::FEATURE_ARTICLE_TOOLS,
|
||||||
|
[
|
||||||
|
Constants::REQUIREMENT_FULLY_INITIALISED,
|
||||||
|
Constants::REQUIREMENT_ARTICLE_TOOLS,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
return $featureManager;
|
return $featureManager;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -584,6 +584,13 @@
|
||||||
"VectorTableOfContentsCollapseAtCount": {
|
"VectorTableOfContentsCollapseAtCount": {
|
||||||
"value": 20,
|
"value": 20,
|
||||||
"description": "@var The minimum number of headings required to collapse all headings in the sticky table of contents by default."
|
"description": "@var The minimum number of headings required to collapse all headings in the sticky table of contents by default."
|
||||||
|
},
|
||||||
|
"VectorArticleTools": {
|
||||||
|
"value": {
|
||||||
|
"logged_in": false,
|
||||||
|
"logged_out": false
|
||||||
|
},
|
||||||
|
"description": "@var array Moves the tools links from the main menu into a new menu in the page toolbar"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ServiceWiringFiles": [
|
"ServiceWiringFiles": [
|
||||||
|
|
Loading…
Reference in a new issue