Sinisakrisan (Talk | contribs) |
Sinisakrisan (Talk | contribs) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
{{alert|<center>'''Note:''' This article is still work in progress</center>|alert}} | {{alert|<center>'''Note:''' This article is still work in progress</center>|alert}} | ||
| − | Used in the standard community plugin to gather data for creating activity stream item | + | 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]] | ||
| + | |||
| + | ====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; } }