Documentation of contexts
Closed this issue · 2 comments
I've read all the documentation several times, but still do not understand the issue of context.
How Can I create a new context? And how can I filter by context?
somebody could add some documentation regarding this issue?
Thanks! : )
Ok, i'll try to improve the documentation.
To add a new context, in your spread
define:
$coll->add(new Entry($user1component), 'NEWCONTEXT');
Then, action will be deployed to GLOBAL context and NEWCONTEXT of $user1.
And then, almost each methods on TimelineManager and ActionManager use an option context
:
$timelines = $timelineManager->getTimeline($user1component, array('context' => 'NEWCONTEXT'));
Behavior of contexts is useful if you want to group some actions.
User1 works with company XYZ (context=GLOBAL, BUSINESS)
User1 eat lasagna (context=GLOBAL, HOBBY)
Then, you'll be able to fetch each related actions to BUSINESS context easily.
Ok Thanks!!
I did this work.