Closed dantleech closed 9 years ago
Hmm. this actually only adds the resolver
services which is not exactly what I intended.
RelationProvider
instances?@dantleech You cannot add a RelationProvider, you could only replace it, which would "break" the library. Adding a RelationProviderResolverInterface is what you should want.
:+1: for the code once my comment is addressed
Updated.
Looks good :+1:
Cool! Can I ask for some documentation? :fearful:
Added some documentation, would have added some more detail but I havn't actually tried this feature out yet.
I am trying to get Hateoas support in the SonataAdminBundle so that it can add links for the Symfony CMF ResourceRestBundle.
Thanks
@dantleech @willdurand It seems the chain resolver isn't being applied automatically. I have to do the following in order to use the chain resolver.
Product:
exclusion_policy: ALL
relation_providers: [hateoas.configuration.provider.resolver.chain]
This PR adds a compiler pass which adds services tagged with
hateoas.relation_provider
to the chain provider.Aims to fix #27