Download the PHP package devhelp/flow-control-bundle without Composer
On this page you can find all versions of the php package devhelp/flow-control-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devhelp/flow-control-bundle
More information about devhelp/flow-control-bundle
Files in devhelp/flow-control-bundle
Package flow-control-bundle
Short Description Provider integration with Devhelp/FlowControl library
License MIT
Homepage http://devhelp.pl
Informations about the package flow-control-bundle
Installation
Composer is preferred way to install FlowControlBundle, please check composer website for more information.
Purpose
FlowControlBundle provides integration with FlowControl library regarding controller actions. It allows you to define your actions as flow steps, meaning that user won't be able to enter an action unless he/she reaches expected step in your flow.
You can, for example:
- define checkout flow for your online store
- define multiple flows at once for different use cases
Usage
There is a sandbox app available on github where you can take closer look at the bundle and how it can be used
Define your flow in config.yml
Define controller actions as flow steps
Done!
Now if you enter an url for action that is a step in some flow, your access will be restricted if the move is not valid
FAQ
How does it change the steps in flow ?
Every action that ends with successful or redirect response is treated as success and ending such action will result in changing current step in the flow for every valid move
Where are the current steps stored ?
'devhelp.flow_control.current_steps' service is responsible for it. Default implementation stores current steps in session
How can I change the way current steps are stored
Right now it is not configurable from the bundle itself (will be soon), but you can use CompilerPass to replace 'devhelp.flow_control.current_steps' service with custom implementation
I don't want my action to automatically update current steps
You can disable this in action configuration
How can I manually update my moves ?
Take a look at the FlowStepsUpdateListener for guidance
How can I customize what happens once no valid steps are found for the action ?
Currently suggested way is to intercept NoValidStepsFoundException on 'kernel.exception' event and replace the Response
Credits
Brought to you by : Devhelp.pl (http://devhelp.pl)