ezsystems/ezp-next — pull request #201 by pspanja (2013-01-14 09:30:42+00:00)
Title: EZP-20097 Specify a api to field types for dealing with relation handling 

DO NOT MERGE
missing: Symfony config not updated

This PR implements issue EZP-20097.

External storage is not used for storing relations anymore, instead a new method, getRelations(), is added to the FieldType interface and used from service to process and store Field relations (LINK, EMBED and FIELD types). For this an internal service RelationProcessor is implemented.

Also, ContentHandler::removeRelation() gets a second parameter $type, since Legacy Stack stores Content level relations (LINK, EMBED and COMMON types) into a same row using bitmask. Legacy Stack is capable of processing non-merged entries, so it is not required to update it not to use relation type bitmask. In time second parameter $type should be deprecated.

Alternatively it should also be possible to patch LS not to store relations with bitmask and thus avoid second parameter to removeRelation() (not probable anyone depends on ezcontentobject_link.id since they change with every update).

Linked with this PR:
https://github.com/ezsystems/ezpublish/pull/529
https://github.com/ezsystems/ezoracle/pull/13