sonata-project/SonataAdminBundle — pull request #1645 by KingCrunch (2013-09-13 23:21:12+00:00)
Title: callback-arguments within ImmutableArrayType

If you use a callback as third "argument" of a field within `immutable_array`, it previously passes the callback itself to the callback, which doesn't make much sense. It passes now `$name`, `$type` and remaining values of the original array.

$optionsCallback = function ($builder, $name, $type, $extra) {
// $name == 'ttl';
// $type == 'text';
// $extra == array('foo', 'bar')
}

$form->add('options', 'sonata_type_immutable_array', array(
'keys' => array(
array('ttl', 'text', $optionsCallback, 'foo', 'bar')
)
));