Asfer
Asfer

Reputation: 73

What is form collection in ZF2

What is ZF2 form collection ? When should we use form collection ? I think ZF2 document has no clear definition about Collection.

Can any one explain with the example?

Thanks for reading.

Upvotes: 0

Views: 56

Answers (1)

Sam
Sam

Reputation: 16455

A Form Collection is used whenever your form is supposed to display multiple instances of a certain object.

For example: You have one Album-Object and you have a Track-Object. One Album is supposed to have multiple Tracks. Instead of adding just one Track per form you can create a collection to allow for multiple tracks to be added at once.

Upvotes: 2

Related Questions