MetaFox

ActivityFeed
in package
implements ActivityFeedContract Uses CheckModeratorSettingTrait

Class ActivityFeed.

Tags
SuppressWarnings

(PHPMD.CouplingBetweenObjects)

Table of Contents

Interfaces

ActivityFeedContract

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

Methods

createActivityPost()

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
Post

createFeedFromFeedSource()

public createFeedFromFeedSource(Model $model[, string|null $fromResource = Feed::FROM_APP_RESOURCE ]) : Feed|null
Parameters
$model : Model
$fromResource : string|null = Feed::FROM_APP_RESOURCE
Tags
inheritDoc
Return values
Feed|null

deleteActivityFeed()

Check exists before using this method.

public deleteActivityFeed(int $feedId) : bool
Parameters
$feedId : int
Tags
todo

if is activity post, delete activity post resource too ?

Return values
bool

deleteCoreFeedsByOwner()

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>|null

getFeedByShareId()

public getFeedByShareId(int $shareId) : Feed|null
Parameters
$shareId : int
Return values
Feed|null

getPrivacyDetail()

public getPrivacyDetail(User $context, Feed $feed[, int|null $representativePrivacy = null ]) : array<string|int, mixed>
Parameters
$context : User
$feed : Feed
$representativePrivacy : int|null = null
Return values
array<string|int, mixed>

putToStream()

Put Feed to stream.

public putToStream(Feed $feed) : void
Parameters
$feed : Feed

putToTagStream()

public putToTagStream(Feed $feed, User $context, int $userAutoTag) : void
Parameters
$feed : Feed
$context : User
$userAutoTag : int

sendFeedComposeNotification()

public sendFeedComposeNotification(Feed $feed) : bool
Parameters
$feed : Feed
Return values
bool

snooze()

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
Snooze

unSnooze()

UnSnooze an user.

public unSnooze(User $user, User $owner[, array<string|int, mixed> $relations = [] ]) : Snooze
Parameters
$user : User
$owner : User
$relations : array<string|int, mixed> = []
Return values
Snooze

getPrivacyListForFeed()

protected getPrivacyListForFeed(Feed $feed) : array<string|int, mixed>
Parameters
$feed : Feed
Return values
array<string|int, mixed>

        
On this page

Search results