ActivityFeed
in package
implements
ActivityFeedContract
Uses
CheckModeratorSettingTrait
Class ActivityFeed.
Tags
Table of Contents
Interfaces
Properties
- $feedRepository : FeedRepositoryInterface
- $snoozeRepository : SnoozeRepositoryInterface
- $typeManager : TypeManager
Methods
- __construct() : mixed
- checkModeratorSetting() : bool
- createActivityFeed() : bool|Feed
- createActivityPost() : Post
- Create an activity post.
- createFeedFromFeedSource() : Feed|null
- deleteActivityFeed() : bool
- Check exists before using this method.
- deleteCoreFeedsByOwner() : void
- deleteTagsStream() : void
- getBackgroundStatusImage() : array<string, mixed>|null
- getFeedByShareId() : Feed|null
- getPrivacyDetail() : array<string|int, mixed>
- isSnooze() : bool
- putToStream() : void
- Put Feed to stream.
- putToTagStream() : void
- sendFeedComposeNotification() : bool
- snooze() : Snooze
- Snooze a user.
- unSnooze() : Snooze
- UnSnooze an user.
- getFromResource() : string
- getPrivacyListForFeed() : array<string|int, mixed>
- handlePendingMode() : void
Properties
$feedRepository
private
FeedRepositoryInterface
$feedRepository
$snoozeRepository
private
SnoozeRepositoryInterface
$snoozeRepository
$typeManager
private
TypeManager
$typeManager
Methods
__construct()
public
__construct(FeedRepositoryInterface $feedRepository, SnoozeRepositoryInterface $snoozeRepository, TypeManager $typeManager) : mixed
Parameters
- $feedRepository : FeedRepositoryInterface
- $snoozeRepository : SnoozeRepositoryInterface
- $typeManager : TypeManager
checkModeratorSetting()
public
checkModeratorSetting(User $user, User $owner, string $settingName) : bool
Parameters
Return values
boolcreateActivityFeed()
public
createActivityFeed(FeedAction $feedAction) : bool|Feed
Parameters
- $feedAction : FeedAction
Tags
Return values
bool|FeedcreateActivityPost()
Create an activity post.
public
createActivityPost(string $content, int $privacy, User $user[, null|User $owner = null ][, array<string|int, int> $list = [] ][, mixed $relations = [] ]) : Post
Parameters
- $content : string
- $privacy : int
- $user : User
- $owner : null|User = null
- $list : array<string|int, int> = []
- $relations : mixed = []
Return values
PostcreateFeedFromFeedSource()
public
createFeedFromFeedSource(Model $model[, string|null $fromResource = Feed::FROM_APP_RESOURCE ]) : Feed|null
Parameters
- $model : Model
- $fromResource : string|null = Feed::FROM_APP_RESOURCE
Tags
Return values
Feed|nulldeleteActivityFeed()
Check exists before using this method.
public
deleteActivityFeed(int $feedId) : bool
Parameters
- $feedId : int
Tags
Return values
booldeleteCoreFeedsByOwner()
public
deleteCoreFeedsByOwner(string $ownerType, int $ownerId) : void
Parameters
- $ownerType : string
- $ownerId : int
deleteTagsStream()
public
deleteTagsStream(array<string|int, mixed> $conditions) : void
Parameters
- $conditions : array<string|int, mixed>
getBackgroundStatusImage()
public
getBackgroundStatusImage(int $bgStatusId) : array<string, mixed>|null
Parameters
- $bgStatusId : int
Return values
array<string, mixed>|nullgetFeedByShareId()
public
getFeedByShareId(int $shareId) : Feed|null
Parameters
- $shareId : int
Return values
Feed|nullgetPrivacyDetail()
public
getPrivacyDetail(User $context, Feed $feed[, int|null $representativePrivacy = null ]) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed>isSnooze()
public
isSnooze(User $user, User $owner) : bool
Parameters
Return values
boolputToStream()
Put Feed to stream.
public
putToStream(Feed $feed) : void
Parameters
- $feed : Feed
putToTagStream()
public
putToTagStream(Feed $feed, User $context, int $userAutoTag) : void
Parameters
sendFeedComposeNotification()
public
sendFeedComposeNotification(Feed $feed) : bool
Parameters
- $feed : Feed
Return values
boolsnooze()
Snooze a user.
public
snooze(User $user, User $owner[, int $snoozeDay = 30 ][, int $isSystem = 0 ][, int $isSnoozed = 1 ][, int $isSnoozedForever = 0 ][, array<string|int, mixed> $relations = [] ]) : Snooze
Parameters
- $user : User
- $owner : User
- $snoozeDay : int = 30
- $isSystem : int = 0
- $isSnoozed : int = 1
- $isSnoozedForever : int = 0
- $relations : array<string|int, mixed> = []
Return values
SnoozeunSnooze()
UnSnooze an user.
public
unSnooze(User $user, User $owner[, array<string|int, mixed> $relations = [] ]) : Snooze
Parameters
Return values
SnoozegetFromResource()
protected
getFromResource(FeedAction $feedAction) : string
Parameters
- $feedAction : FeedAction
Return values
stringgetPrivacyListForFeed()
protected
getPrivacyListForFeed(Feed $feed) : array<string|int, mixed>
Parameters
- $feed : Feed
Return values
array<string|int, mixed>handlePendingMode()
protected
handlePendingMode(Content $model, Feed $feed) : void