本文整理汇总了PHP中CActivityStream::formatStreamAttachment方法的典型用法代码示例。如果您正苦于以下问题:PHP CActivityStream::formatStreamAttachment方法的具体用法?PHP CActivityStream::formatStreamAttachment怎么用?PHP CActivityStream::formatStreamAttachment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CActivityStream
的用法示例。
在下文中一共展示了CActivityStream::formatStreamAttachment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$attachment->type = 'general';
break;
}
!isset($attachment->type) ? $attachments = array() : ($attachments[] = $attachment);
$groupString = "";
if (isset($activity->groupid) && !empty($activity->groupid)) {
$groupTable = JTable::getInstance('Group', 'CTable');
$groupTable->load($activity->groupid);
$groupString = JText::sprintf('COM_COMMUNITY_SHARE_VIDEO_FROM_GROUP', $groupTable->getLink(), $groupTable->name);
}
$stream = new stdClass();
$stream->actor = $user;
$stream->target = null;
$stream->headline = JText::sprintf('COM_COMMUNITY_ACTIVITY_SHARE_STATUS', CUrlHelper::userLink($user->id), $user->getDisplayName(), CUrlHelper::userLink($actor->id), $actor->getDisplayName(), isset($app[$activity->app]) ? $app[$activity->app] : '') . $groupString;
$stream->message = CActivities::format($act->title);
$stream->mood = $params->get('mood', NULL);
$stream->sharedMessage = CActivities::format($activity->title);
$stream->sharedMood = $activityParam->get('mood', NULL);
$stream->groupid = $activity->groupid;
$stream->eventid = "";
$stream->access = $this->act->access;
$stream->attachments = $attachments;
/**
* @todo Need to clearly this one
* Right now it's return on right data
*/
$stream->attachments[] = CActivityStream::formatStreamAttachment($activity);
$stream->createdtime = $createdTime;
$this->set('stream', $stream);
$this->load('stream/base-extended');
}