-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Feature/make collection configurable #5719
Feature/make collection configurable #5719
Conversation
This commit adds more configuration options to the FormCollection-ViewHelper. The hard-coded fieldset-wrapper is now configurable as is the hard-coded legend as well as the hard-coded position and template of the template-provider. The defaults have been set to the currently hard-coded values, so that no BC-break should happen. Also the behaviour of the template-renderer has been changed in so far as the template is now rendered using the collection-object and not the content of the collection-object THis might be a case of BC-Break in edge-cases but the current default-behaviour as provided by the unit-tests is not broken. No tests have been changed, there have only been additions
THis aims to a better CodeCoverage
Looks good to me. 👍 |
@Maks3w doesn't seem like there's any BC break here - can be thrown at develop IMO :D |
* string | ||
* 3. The template span-tag. This might also be an empty string | ||
* | ||
* The preset default is <pre><fieldset>%2$s%2$s%3$s</fieldset></pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This don't match default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting this typo. I'll just change that one to <fieldset>%2$s%1$s%3$s</fieldset>
@heiglandreas #5623 provides some logic to ensure that
On merging your PR to the develop branch, I had a merge conflict due to those changes. I tried changing the Any chance you can take a look at it? |
This was wrong, once I paid more attention to the '<fieldset%1$s>%3$s%2$s%4$s</fieldset>' And the $markup = sprintf(
$this->wrapper,
$attributeString,
$markup,
$legend,
$templateMarkup
); This gets me closer - now only 2 failing tests. Will let you know if I get any closer. |
…igurable Feature/make collection configurable Conflicts: library/Zend/Form/View/Helper/FormCollection.php tests/ZendTest/Form/View/Helper/FormCollectionTest.php
@heiglandreas Got it! Merged to develop for release with 2.3.0. |
This commit adds more configuration options to the
FormCollection-ViewHelper.
The hard-coded fieldset-wrapper is now configurable as is the hard-coded
legend as well as the hard-coded position and template of the
template-provider. The defaults have been set to the currently
hard-coded values, so that no BC-break should happen.
Also the behaviour of the template-renderer has been changed in so far
as the template is now rendered using the collection-object and not the
content of the collection-object
THis might be a case of BC-Break in edge-cases but the current
default-behaviour as provided by the unit-tests is not broken.
No tests have been changed, there have only been additions
This PR is a follow-up to #5565