Add Article Tools feature flag

Bug: T306609
Change-Id: Ia40af4e48c006aeceebd3879ff0aaecbe1b200d4
This commit is contained in:
bwang 2022-09-28 12:52:01 -05:00
parent 8cd41a8c64
commit e7944de81c
3 changed files with 42 additions and 0 deletions

View File

@ -225,6 +225,21 @@ final class Constants {
*/
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.
* @throws FatalError

View File

@ -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;
}
];

View File

@ -584,6 +584,13 @@
"VectorTableOfContentsCollapseAtCount": {
"value": 20,
"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": [