stephpy/timeline-bundle

Arguments for Spread

Closed this issue · 3 comments

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.

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.

Thanks, this should work. Will try.

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