opengento/feature-toggle2
Composer 安装命令:
composer require opengento/feature-toggle2
包简介
README 文档
README
by Opengento
This module allows you to use the Feature Flags, or sometimes called "Feature Toggle" functionality.
To use a toggle, you just have to call the helper, like this:
/* @var $toggleHelper \Opengento\FeatureToggle2\Helper\Toggle */ if ($toggleHelper->isToggleActive('my-feature-flag')) { // Toggle activated } else { // Toogle inactive }
XML sample
The filename is toggles.xml, and you have to put it in the etc/ directory of your module.
<?xml version="1.0"?> <toggles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Opengento_FeatureToggle2:etc/toggles.xsd"> <toggle id="my-feature-flag"> <label>My Feature Flag</label> <description>This feature flag is a sample toggle.</description> </toggle> </toggles>
Contributing
See CONTRIBUTING.md.
Maintainers
See Contributors list.
统计信息
- 总下载量: 799
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-24