Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Add loop method to \Zend\View\Helper\PartialLoop #1

Closed
wants to merge 2 commits into from

Conversation

bfolliot
Copy link
Contributor

@bfolliot bfolliot commented Jun 2, 2015

Allows to chain setter with rendering, for example :

<?= $this->partialLoop()
    ->setObjectKey('myKey')
    ->loop('myPartial', $myArray) ?>

An alternative could be a 3rd parameter to invoke for the key.

@froschdesign
Copy link
Member

@bfolliot
Please add unit tests for the new method. Thanks!

@bfolliot
Copy link
Contributor Author

bfolliot commented Oct 2, 2015

All test for the __invoke method work for the loop method, are you sure we need to duplicate the tests?

@froschdesign
Copy link
Member

All test for the __invoke method work for the loop method

  • New method – new test
  • There are different return values.

@bfolliot
Copy link
Contributor Author

I'm not sure for the name of methods

@weierophinney weierophinney added this to the 2.7.0 milestone May 11, 2016
@weierophinney weierophinney self-assigned this May 11, 2016
weierophinney added a commit that referenced this pull request May 12, 2016
Add loop method to \Zend\View\Helper\PartialLoop
weierophinney added a commit that referenced this pull request May 12, 2016
weierophinney added a commit that referenced this pull request May 12, 2016
@weierophinney
Copy link
Member

Merged to develop for release with 2.7.0.

Thanks, @bfolliot !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants