yohang/Finite — pull request #33 by winzou (2014-04-29 10:45:57+00:00)
Title: Add a callback to cascade transitions

Hi,

This PR adds 2 useful things:

1. The ability to pass arguments to callbacks. Currently, we are limited to the arguments $object and $transitionEvent. With this PR you can define arguments to pass to your callback directly from the graph configuration (via the `args` parameter).
2. A simple callback that you can use (in combination with the callback arguments :) to cascade some transitions. I updated the `callback.php` example with an automatic transition from accepted to archived. This can be useful in many cases. The callback supports as well the cascade when dealing with the same object but different graph, and even with another object reachable from the main object via a PropertyAccessor (for example, when your shipment goes from ready to shipped, you may want to automatically update your order (reachable with shipment.order).

Thanks,