For now, the new admin generator generates a getForm() method in the base class Base[Module]GeneratorConfiguration. The generated method looks like the following one :
public function getForm($object = null)
{
$class = $this->getFormClass();
return new $class($object, $this->getFormOptions());
}
But there is a problem with it ! It's not possible to pass extra options to the form to initialize it. For example, when we need to use a sfWidgetFormJQueryAutocompleter widget, we must pass it the generated URI that the ajax call has to request.
So, currently the solution is to override the getForm() inside the [Module]GeneratorConfiguration class in order to pass a second extra argument of options that will be merged with the returned array of $this->getFormOptions().
The given patch provides this small improvment for both doctrine and propel generators.