silverstripe/sapphire — pull request #663 by simonwelsh (2012-07-23 05:50:44+00:00)
Title: NEW Allow arguments to be passed to allowed_action checkers

This allows arguments to be passed along in an $allowed_actions deceleration of
the form 'action' => '->method' in the same way that arguments can be passed to
extension constructors when adding them using $extensions or
Object::add_extension.

I.e. 'action' => '->checkerMethod(false, 7, 2, "yesterday") would call the
checkerMethod method with the boolean false the numbers 7 and 2 and the string
"yesterday" as its arguments.

There's a test for the old functionality and one for the new. Uses Object::parse_class_spec()