Download the PHP package nassau/relation-collection without Composer
On this page you can find all versions of the php package nassau/relation-collection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download nassau/relation-collection
More information about nassau/relation-collection
Files in nassau/relation-collection
Download nassau/relation-collection
More information about nassau/relation-collection
Files in nassau/relation-collection
Vendor nassau
Package relation-collection
Short Description Doctrine Collection automatically sets the owner when adding an item
License MIT
Package relation-collection
Short Description Doctrine Collection automatically sets the owner when adding an item
License MIT
Please rate this library. Is it a good library?
Informations about the package relation-collection
Doctrine Relation Collection
This Collection knows about their parent and sets it on an item when adding, .i.e:
This way you can manage this relation via Symfony Forms without the ugly by_reference
and addBar()/removeBar()
methods.
Requirements
You need to either:
- wrap an initialized
PersistentCollection
withPeristentAssociationRelationCollection
— works out of the box - use
RelationCollection
and tell it how to set the owner of an object using a closure. the former does this automatically basing on mapping information retrieved fromPersistentCollection
Why?
Because I don’t want to write adders/removers boilerplate for every relation. And also because of reasons.
Example usage
With existing doctrine relations
Manually
All versions of relation-collection with dependencies
PHP Build Version
Package Version
Requires
doctrine/orm Version
^2.5
The package nassau/relation-collection contains the following files
Loading the files please wait ....