MetaFox

FeedRepositoryInterface extends HasSponsor
in

Interface FeedRepositoryInterface.

Tags
mixin

AbstractRepository

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
$context : User
$feed : Feed
$params : array<string|int, mixed>
Return values
bool

approvePendingFeed()

public approvePendingFeed(User $context, int $id) : array<int, mixed>
Parameters
$context : User
$id : int
Tags
throws
AuthorizationException
Return values
array<int, mixed>

checkSpamStatus()

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
bool

countFeed()

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
int

createFeed()

Create a feed (activity post).

public createFeed(User $context, User $user, User $owner, array<string, mixed> $params) : array<string, mixed>
Parameters
$context : User
$user : User
$owner : User
$params : array<string, mixed>
Tags
throws
AuthorizationException
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
throws
AuthorizationException
Return values
bool

deleteFeed()

Delete a feed.

public deleteFeed(User $user, int $id) : bool
Parameters
$user : User
$id : int
Tags
throws
AuthorizationException
Return values
bool

getFeedByItem()

public getFeedByItem(User|null $context, Entity|null $content[, string|null $typeId = null ]) : Feed
Parameters
$context : User|null
$content : Entity|null
$typeId : string|null = null
Tags
throws
AuthorizationException
Return values
Feed

getFeedByItemId()

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
throws
AuthorizationException
Return values
Feed|null

getFeeds()

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
throws
AuthorizationException
SuppressWarnings

(PHPMD.BooleanArgumentFlag)

SuppressWarnings

(PHPMD.ExcessiveParameterList)

Return values
array<string|int, Feed>|Collection

getMissingContentFeed()

public getMissingContentFeed(string $typeId) : Collection
Parameters
$typeId : string
Return values
Collection

getOwnerPrivacyDetail()

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

getPrivacyDetail()

public getPrivacyDetail(User $context, Content $resource[, int|null $representativePrivacy = null ]) : array<string|int, mixed>
Parameters
$context : User
$resource : Content
$representativePrivacy : int|null = null
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
Collection

getSponsoredItem()

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

getTaggedFriends()

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
LengthAwarePaginator

handlePutToTagStream()

public handlePutToTagStream(User $context, User $friend, int $itemId, string $itemType, string $typeId) : mixed
Parameters
$context : User
$friend : User
$itemId : int
$itemType : string
$typeId : string

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
bool

pushFeedOnTop()

public pushFeedOnTop(int $feedId) : bool
Parameters
$feedId : int
Return values
bool

sponsor()

public sponsor(User $context, int $id, int $sponsor) : bool
Parameters
$context : User
$id : int
$sponsor : int
Tags
throws
AuthorizationException
Return values
bool

sponsorFeed()

public sponsorFeed(User $context, Feed $feed, int $sponsor) : bool
Parameters
$context : User
$feed : Feed
$sponsor : int
Tags
throws
AuthorizationException
Return values
bool

unsponsor()

public unsponsor(User $context, int $id) : bool
Parameters
$context : User
$id : int
Return values
bool

updateFeed()

Update a feed.

public updateFeed(User $context, User $user, int $id, array<string, mixed> $params) : Feed
Parameters
$context : User
$user : User
$id : int
$params : array<string, mixed>
Tags
throws
AuthorizationException
Return values
Feed

updateFeedPrivacy()

Update feed privacy.

public updateFeedPrivacy(User $context, Feed $feed, array<string, mixed> $params) : Feed
Parameters
$context : User
$feed : Feed
$params : array<string, mixed>
Tags
throws
AuthorizationException
Return values
Feed

        
On this page

Search results