FeedRepositoryInterface
extends
HasSponsor
in
Interface FeedRepositoryInterface.
Tags
Table of Contents
Methods
- allowReviewTag() : bool
- approvePendingFeed() : array<int, mixed>
- approvePendingFeeds() : void
- archiveFeed() : bool
- checkSpamStatus() : bool
- countFeed() : int
- countFeedPendingOnOwner() : int
- createFeed() : array<string, mixed>
- Create a feed (activity post).
- declinePendingFeed() : bool
- deleteFeed() : bool
- Delete a feed.
- deleteFeedByUserAndOwner() : void
- disableSponsor() : void
- enableSponsor() : void
- getFeed() : Feed
- Get feed detail.
- getFeedByItem() : Feed
- getFeedByItemId() : Feed|null
- getFeedForEdit() : Feed
- getFeeds() : array<string|int, Feed>|Collection
- Get main activity feeds.
- getMissingContentFeed() : Collection
- getOwnerPrivacyDetail() : array<string|int, mixed>
- getPrivacyDetail() : array<string|int, mixed>
- getPrivacyIds() : array<string|int, mixed>
- getRandomSponsoredItems() : Collection
- getSpamStatusSetting() : int
- getSponsoredItem() : Content
- getSponsorPriceForPayment() : float|null
- getTaggedFriends() : LengthAwarePaginator
- handlePutToTagStream() : mixed
- handleRemoveNotification() : void
- hasNewFeeds() : bool
- hideFeed() : bool
- Hide a feed.
- isSponsor() : bool
- pushFeedOnTop() : bool
- removeTagFriend() : bool
- sponsor() : bool
- sponsorFeed() : bool
- unHideFeed() : bool
- UnHide a feed.
- unsponsor() : bool
- updateFeed() : Feed
- Update a feed.
- updateFeedPrivacy() : Feed
- Update feed privacy.
Methods
allowReviewTag()
public
allowReviewTag(User $context, Feed $feed, array<string|int, mixed> $params) : bool
Parameters
Return values
boolapprovePendingFeed()
public
approvePendingFeed(User $context, int $id) : array<int, mixed>
Parameters
- $context : User
- $id : int
Tags
Return values
array<int, mixed>approvePendingFeeds()
public
approvePendingFeeds(User $user, User $owner) : void
Parameters
archiveFeed()
public
archiveFeed(User $context, int $id) : bool
Parameters
- $context : User
- $id : int
Return values
boolcheckSpamStatus()
public
checkSpamStatus(User $user, string $itemType, string|null $content[, int|null $itemId = null ]) : bool
Parameters
- $user : User
- $itemType : string
- $content : string|null
- $itemId : int|null = null
Return values
boolcountFeed()
public
countFeed(string $ownerType, int $ownerId[, string|null $status = MetaFoxConstant::ITEM_STATUS_APPROVED ][, int|null $userId = null ]) : int
Parameters
- $ownerType : string
- $ownerId : int
- $status : string|null = MetaFoxConstant::ITEM_STATUS_APPROVED
- $userId : int|null = null
Return values
intcountFeedPendingOnOwner()
public
countFeedPendingOnOwner(User $context, User $owner) : int
Parameters
Return values
intcreateFeed()
Create a feed (activity post).
public
createFeed(User $context, User $user, User $owner, array<string, mixed> $params) : array<string, mixed>
Parameters
Tags
Return values
array<string, mixed>declinePendingFeed()
public
declinePendingFeed(User $context, int $id, array<string|int, mixed> $params) : bool
Parameters
- $context : User
- $id : int
- $params : array<string|int, mixed>
Tags
Return values
booldeleteFeed()
Delete a feed.
public
deleteFeed(User $user, int $id) : bool
Parameters
- $user : User
- $id : int
Tags
Return values
booldeleteFeedByUserAndOwner()
public
deleteFeedByUserAndOwner(User $context, Content $owner) : void
Parameters
disableSponsor()
public
disableSponsor(Content $content) : void
Parameters
- $content : Content
enableSponsor()
public
enableSponsor(Content $content) : void
Parameters
- $content : Content
getFeed()
Get feed detail.
public
getFeed(User|null $user, int $id) : Feed
Parameters
- $user : User|null
- $id : int
Tags
Return values
FeedgetFeedByItem()
public
getFeedByItem(User|null $context, Entity|null $content[, string|null $typeId = null ]) : Feed
Parameters
Tags
Return values
FeedgetFeedByItemId()
public
getFeedByItemId(User $context, int $itemId, string $itemType, string $typeId[, bool $checkPermission = true ]) : Feed|null
Parameters
- $context : User
- $itemId : int
- $itemType : string
- $typeId : string
- $checkPermission : bool = true
Tags
Return values
Feed|nullgetFeedForEdit()
public
getFeedForEdit(User $context, int $id) : Feed
Parameters
- $context : User
- $id : int
Tags
Return values
FeedgetFeeds()
Get main activity feeds.
public
getFeeds(User $user[, User|null $owner = null ][, int|null $lastFeedId = null ][, int $need = Pagination::DEFAULT_ITEM_PER_PAGE ][, string|null $hashtag = null ][, bool $friendOnly = false ][, array<string, mixed>|null $extraConditions = null ][, string|null $sort = Browse::SORT_RECENT ][, string|null $sortType = MetaFoxConstant::SORT_DESC ][, bool $getFeedSponsor = false ][, array<string|int, mixed>|null $status = null ][, bool $isPreviewTag = false ][, array<string|int, mixed>|null $loadedSponsoredFeedIds = null ][, array<string|int, mixed> $params = [] ]) : array<string|int, Feed>|Collection
Parameters
- $user : User
- $owner : User|null = null
- $lastFeedId : int|null = null
- $need : int = Pagination::DEFAULT_ITEM_PER_PAGE
- $hashtag : string|null = null
- $friendOnly : bool = false
- $extraConditions : array<string, mixed>|null = null
- $sort : string|null = Browse::SORT_RECENT
- $sortType : string|null = MetaFoxConstant::SORT_DESC
- $getFeedSponsor : bool = false
- $status : array<string|int, mixed>|null = null
- $isPreviewTag : bool = false
- $loadedSponsoredFeedIds : array<string|int, mixed>|null = null
- $params : array<string|int, mixed> = []
Tags
Return values
array<string|int, Feed>|CollectiongetMissingContentFeed()
public
getMissingContentFeed(string $typeId) : Collection
Parameters
- $typeId : string
Return values
CollectiongetOwnerPrivacyDetail()
public
getOwnerPrivacyDetail(User $context, User $resource[, int|null $representativePrivacy = null ]) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed>getPrivacyDetail()
public
getPrivacyDetail(User $context, Content $resource[, int|null $representativePrivacy = null ]) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed>getPrivacyIds()
public
getPrivacyIds(User $owner, Feed $feed) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed>getRandomSponsoredItems()
public
getRandomSponsoredItems(User $context, int $limit[, array<string|int, mixed>|null $loadedItemIds = null ]) : Collection
Parameters
- $context : User
- $limit : int
- $loadedItemIds : array<string|int, mixed>|null = null
Return values
CollectiongetSpamStatusSetting()
public
getSpamStatusSetting() : int
Return values
intgetSponsoredItem()
public
getSponsoredItem(array<string|int, int> $notInIds[, int|null $sponsorStart = null ][, array<string|int, mixed> $with = [] ]) : Content
Parameters
- $notInIds : array<string|int, int>
- $sponsorStart : int|null = null
- $with : array<string|int, mixed> = []
Return values
Content —| null
getSponsorPriceForPayment()
public
getSponsorPriceForPayment(User $user[, string|null $currencyId = null ]) : float|null
Parameters
- $user : User
- $currencyId : string|null = null
Return values
float|nullgetTaggedFriends()
public
getTaggedFriends(int $itemId, string $itemType, int $limit[, array<string|int, mixed> $excludedIds = [] ]) : LengthAwarePaginator
Parameters
- $itemId : int
- $itemType : string
- $limit : int
- $excludedIds : array<string|int, mixed> = []
Return values
LengthAwarePaginatorhandlePutToTagStream()
public
handlePutToTagStream(User $context, User $friend, int $itemId, string $itemType, string $typeId) : mixed
Parameters
handleRemoveNotification()
public
handleRemoveNotification(string $notificationType, int $itemId, string $itemType) : void
Parameters
- $notificationType : string
- $itemId : int
- $itemType : string
hasNewFeeds()
public
hasNewFeeds(User $context[, int $lastFeedId = 0 ][, int $lastPinFeedId = 0 ][, User|null $owner = null ][, string|null $sort = null ][, int $lastSponsoredFeedId = 0 ]) : bool
Parameters
- $context : User
- $lastFeedId : int = 0
- $lastPinFeedId : int = 0
- $owner : User|null = null
- $sort : string|null = null
- $lastSponsoredFeedId : int = 0
Return values
boolhideFeed()
Hide a feed.
public
hideFeed(User $user, Feed $feed) : bool
Parameters
Tags
Return values
boolisSponsor()
public
isSponsor(Content $model) : bool
Parameters
- $model : Content
Return values
boolpushFeedOnTop()
public
pushFeedOnTop(int $feedId) : bool
Parameters
- $feedId : int
Return values
boolremoveTagFriend()
public
removeTagFriend(Feed $feed) : bool
Parameters
- $feed : Feed
Return values
boolsponsor()
public
sponsor(User $context, int $id, int $sponsor) : bool
Parameters
- $context : User
- $id : int
- $sponsor : int
Tags
Return values
boolsponsorFeed()
public
sponsorFeed(User $context, Feed $feed, int $sponsor) : bool
Parameters
Tags
Return values
boolunHideFeed()
UnHide a feed.
public
unHideFeed(User $user, Feed $feed) : bool
Parameters
Tags
Return values
boolunsponsor()
public
unsponsor(User $context, int $id) : bool
Parameters
- $context : User
- $id : int
Return values
boolupdateFeed()
Update a feed.
public
updateFeed(User $context, User $user, int $id, array<string, mixed> $params) : Feed
Parameters
Tags
Return values
FeedupdateFeedPrivacy()
Update feed privacy.
public
updateFeedPrivacy(User $context, Feed $feed, array<string, mixed> $params) : Feed