ZF-2551: Posiibility to add cusomized DisplagGroup

Description

Maybe I am wrong, but it seems that there is no way to extend Zend_Form_DisplayGroup and then add it to Zend_Form. Currently the addDisplayGroup() instantiates Zend_Form_DisplayGroup. It might be helpful to add the possibility to pass the prefix and the path where the extended class can be found as optional arguments of addDisplayGroup() or as additional keys of $options array. The other way could be using Zend_Loader_PluginLoader class and setting custom DisplayGroups location during Zend_Form instantiation exactly as for custom Element classes.

Comments

This is partially possible now in current trunk. It does not include any possibility of using the PluginLoader functionality, but you can specify a class to use for a display group either globally for the given form, or for an individual group:


// all display groups:
$form->setDefaultDisplayGroupClass('My_Custom_DisplayGroup');

// single display group:
$form->addDisplayGroup(array('foo', 'bar'), 'foobar', array('displayGroupClass' => 'My_Custom_DisplayGroup'));

Both examples require that the class has either been loaded already or that it uses standard ZF naming conventions.

I will likely add additional capabilities for adding display groups in the future, including adding concrete display group instances and the ability to specify paths to display groups via a PluginLoader, so I will leave this ticket open to track that.

Scheduling for mini release following 1.5.0

This issue should have been fixed for the 1.5 release.

Please categorize/fix as needed.

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Scheduling for next minor release.

This has been merged to the 1.6 release branch.

Updating for the 1.6.0 release.