Download the PHP package opensoft/rollout-bundle without Composer
On this page you can find all versions of the php package opensoft/rollout-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download opensoft/rollout-bundle
More information about opensoft/rollout-bundle
Files in opensoft/rollout-bundle
Package rollout-bundle
Short Description A Symfony2/3/4 Bundle for opensoft/rollout
License MIT
Informations about the package rollout-bundle
OpensoftRolloutBundle
A Symfony3 Bundle for opensoft/rollout
Obligatory Screenshot
Installation
1) Install via composer
Add the bundle via composer
composer require opensoft/rollout-bundle
And activate it inside your app\AppKernel.php
2) Configuration
Add the following to your configuration (supports auto-wiring)
user_provider_service
: Add the service id (generally the FQDN with auto-wiring) of the UserProvider to which you added the RolloutUserProviderInterface
storage_service
: Defaults toOpensoft\Rollout\Storage\ArrayStorage
, but you can also use the includedOpensoft\RolloutBundle\Storage\Doctrine\DoctrineORMStorage
or create your own (see below for implementation)
3) Implement Interfaces
RolloutUserInterface
Any rollout user must implement the RolloutUserInterface
. Often, this will be your main user object in the application.
UserProviderInterface
Expose individual users to the rollout interface by implementing the UserProviderInterface
GroupDefinitionInterface
Provide different groups of users to your rollout.
Tag all of your group definitions with the DIC tag rollout.group
to expose them to the rollout interface
StorageInterface
Implement a custom storage solution.
Note: The rollout StorageInterface
changed in version 2.0.0
.
4) Activate Routing
Add the following to your app/Resources/config/routing.yml
file:
opensoft_rollout:
resource: "@OpensoftRolloutBundle/Resources/config/routing.yml"
prefix: /admin/rollout
Usage
Check if a feature is enabled in a controller
Twig example:
Further Reading
All versions of rollout-bundle with dependencies
symfony/framework-bundle Version ~2.1|^3.0|^4.0
opensoft/rollout Version ~2.1