stephpy / timeline-bundle

Symfony2 bundle to make timeline
192 stars 57 forks source link

Arguments for Spread #184

Closed berdyshev closed 9 years ago

berdyshev commented 9 years ago

Hey,

I have a form where user can add post to his wall. There some options on the form which allow him to configure who will see his post: all friends, all users from my city, users which have actual interests, etc...

So the question is: is there any possibility to pass this options (arguments) to the Spread. I tried to add one more component to the action of the post, but I got fatal error, because this component doesn't have identifier. Is there any way to do that?

Thanks.

stephpy commented 9 years ago

Hi,

Since action could be spread later See documentation, It's hard to add options to the action or options have to be persisted.

By this way, i would recommend you to add a field into Action entity with a field (or association) which will identify for who action is destined. Then, on your spread class, you'll be able to use this field and spread to the good components.

berdyshev commented 9 years ago

Thanks, this should work. Will try.

stephpy commented 9 years ago

I close this issue, if you have any question, re-open it. :)