Feature Flags

Component ID

1911390

Component name

Feature Flags

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

838

Component created

Component changed

Component body

What is Feature Flags?

Feature flags provide the ability to restrict features to certain environments, while still using the same code base on all servers. This module supports restricting access via user roles, user names, and population percentages. This allows standard site administrators to slowly roll out new features to their users, as well as disable slow or underperforming features.

Administration

The main administration page is located at admin/config/development/featureflags, and lists all the current feature flags in the system. A new feature flag can be created by loading admin/config/development/featureflags/add.

API

The API can be accessed via the featureflags_cando() function.

Example:

<?php
if(featureflags_cando('experimental_search')){
  // show experimental search
}else{
  // show old search
}
?>