ZF-3254: disableLoadDefaultDecorators is ignored for DisplayGroup
Description
$this->addDisplayGroup(array('number', 'prefix'), 'phone', array(
'disableLoadDefaultDecorators' => true,
));
Default decorators will be loaded anyway...
Pass $option to Zend_Form_DisplayGroup::__construct() instead of calling Zend_Form_DisplayGroup::setOption(), because Zend_Form_DisplayGroup::loadDefaultDecorators is called at constructor... So:
$this->_displayGroups[$name] = new $class(
$name,
$this->getPluginLoader(self::DECORATOR)
);
if (!empty($this->_displayGroupPrefixPaths)) {
$this->_displayGroups[$name]->addPrefixPaths($this->_displayGroupPrefixPaths);
}
if (is_array($options)) {
$this->_displayGroups[$name]->setOptions($options);
} elseif ($options instanceof Zend_Config) {
$this->_displayGroups[$name]->setConfig($options);
}
replace with
$this->_displayGroups[$name] = new $class(
$name,
$this->getPluginLoader(self::DECORATOR),
$options
);
if (!empty($this->_displayGroupPrefixPaths)) {
$this->_displayGroups[$name]->addPrefixPaths($this->_displayGroupPrefixPaths);
}
Comments
Posted by Wil Sinclair (wil) on 2008-06-08T06:04:03.000+0000
Please evaluate/fix as necessary.
Posted by Matthew Weier O'Phinney (matthew) on 2008-08-05T08:21:50.000+0000
Patched in trunk with r10679 and in 1.6 release branch with r10680.
Posted by Wil Sinclair (wil) on 2008-09-02T10:39:45.000+0000
Updating for the 1.6.0 release.