Closed
Description
Currently, the createNamed*
methods of FormFactoryInterface are defined like this:
function createNamed($type, $name, $data = null, array $options = array(), FormBuilder $parent = null);
function createNamedBuilder($type, $name, $data = null, array $options = array(), FormBuilder $parent = null);
This is very confusing since the parameters $type
and $name
are defined in FormBuilder::add()
in the exact opposite order:
$builder->add('field', 'text');
// but:
$form = $factory->createNamed('text', 'field');
I think that the order of the parameters should be switched in order to make usage of the FormFactory
methods more intuitive. This would break BC.
Thoughts?