25/06
2017
Wallogit.com
2017 © Pedro Peláez
by Opengento, (*1)
, (*2)
This module allows you to use the Feature Flags, or sometimes called "Feature Toggle" functionality., (*3)
To use a toggle, you just have to call the helper, like this:, (*4)
/* @var $toggleHelper \Opengento\FeatureToggle2\Helper\Toggle */
if ($toggleHelper->isToggleActive('my-feature-flag')) {
// Toggle activated
} else {
// Toogle inactive
}
The filename is toggles.xml, and you have to put it in the etc/ directory of your module., (*5)
<?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>
See CONTRIBUTING.md., (*6)
See Contributors list., (*7)