[Flow] Achieve loose coupling between packages (models)

Søren Malling soren.malling at gmail.com
Sat May 17 22:26:03 CEST 2014


Hej Teo,

Yes, that should be possible. Simply annotate with a "interface" class and
have that class overwritten inside Objects.yaml of the package implementing
the interface.

Cheers

Søren


On Fri, May 16, 2014 at 5:25 PM, Teo C. <mathaios76 at gmail.com> wrote:

> Hello,
> I'm creating a modular app with some packages that should work together,
> but still be able to be included in other apps (mainly for going open
> source, one day).
>
> I'm struggling how to to do this: as an example in a package I have a
> "Booking" class, which is related (ManyToMany) to a "Person" class in the
> Users Package, and I do not want to hardcode that dependency in the Booking
> class via the usual annotation.
>
> I came across this interesting article: http://symfony.com/doc/
> current/cookbook/doctrine/resolve_target_entity.html
>
> It's about Symfony but it's related to Doctrine. Can this be achieved in
> Flow too ? I found this in the manual:
> http://docs.typo3.org/flow/TYPO3FlowDocumentation/
> TheDefinitiveGuide/PartIII/Persistence.html#on-the-doctrine-event-system
>
> but at a closer look I do not think it's the same thing, or at least I
> have no idea how to configure it to fulfill my need. Has someone any tips ?
> Thank you !
>
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>


More information about the Flow mailing list