cakephp/cakephp — pull request #1418 by markstory (2013-07-14 03:39:05+00:00)
Title: 3.0 component events

Start updating the Component callbacks to be similar to the new helper changes I did recently. I still have a few things I'm undecided on/unsure of:

* The `$controller` parameter to each callback seems a bit redundant. It is rarely used, and can be fetched easily using `$event->subject()`.
* The `beforeRedirect()` callback currently does not work as it should. The changes made during the event are lost. I've considered replacing the url, status, and exit parameters with a reference to the response object. That would allow each callback listener to modify the response as required.

There will need to be some more work done around reducing the duplication between HelperCollection and ComponentCollection. The names are no longer very good, but that can be dealt with in a future pull request.