opengento/feature-toggle2

Installs: 198

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 21

Forks: 0

Open Issues: 0

Type:magento2-module

dev-master 2017-06-25 11:57 UTC

This package is auto-updated.

Last update: 2024-03-29 03:39:01 UTC


README

by Opengento

Logo Opengento Feature Toggle for Magento 2

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.