Sinisakrisan (Talk | contribs) |
Sinisakrisan (Talk | contribs) |
||
| Line 4: | Line 4: | ||
Used in the standard community plugin to gather data for creating activity stream item<br/> | Used in the standard community plugin to gather data for creating activity stream item<br/> | ||
More information and full guide can be [[Stream API v2|seen here]] | More information and full guide can be [[Stream API v2|seen here]] | ||
| + | |||
| + | ====Example==== | ||
| + | <syntaxhighlight lang="php"> | ||
| + | class plgCommunityExample extends CApplications | ||
| + | { | ||
| + | public function onCommunityStreamRender($act) | ||
| + | { | ||
| + | $actor = CFactory::getUser($act->actor); | ||
| + | |||
| + | $stream = new stdClass(); | ||
| + | $stream->actor = $actor; | ||
| + | $stream->headline = 'Headline'; | ||
| + | $stream->message = 'Message'; | ||
| + | return $stream; | ||
| + | } | ||
| + | } | ||
| + | </syntaxhighlight> | ||
| + | <br /> | ||
Latest revision as of 22:27, 24 April 2013
Used in the standard community plugin to gather data for creating activity stream item
More information and full guide can be seen here
Example
class plgCommunityExample extends CApplications { public function onCommunityStreamRender($act) { $actor = CFactory::getUser($act->actor); $stream = new stdClass(); $stream->actor = $actor; $stream->headline = 'Headline'; $stream->message = 'Message'; return $stream; } }