MetaFox

Feed extends Model
in package
implements Content, HasPrivacy, HasTotalView, HasTotalShare, HasTotalLike, HasTotalCommentWithReply, HasItemMorph, HasSponsor, HasHashTag, HasGlobalSearch, HasSavedItem Uses HasContent, HasAmountsTrait, HasUserMorph, HasOwnerMorph, HasItemMorph, HasFactory, HasHashTagTrait, AppendPrivacyListTrait

Class Feed.

Tags
mixin

Builder

Table of Contents

Interfaces

Content
Interface Content.
HasPrivacy
Interface HasPrivacy.
HasTotalView
Interface HasTotalView.
HasTotalShare
Interface HasTotalLike.
HasTotalLike
Interface HasTotalLike.
HasTotalCommentWithReply
Interface HasTotalComment.
HasItemMorph
HasSponsor
Interface HasSponsor.
HasHashTag
Interface Entity.
HasGlobalSearch
Interface HasGlobalSearch.
HasSavedItem
Interface HasSavedItem.

Constants

ENTITY_TYPE  = 'feed'
FROM_APP_RESOURCE  = 'app'
FROM_FEED_RESOURCE  = 'feed'
IMPORT_ENTITY_TYPE  = 'activity_feed'
TO_LINK_REVIEW  = '/settings/review'

Properties

$content  : string|null
$created_at  : string|Carbon
$feed_reference  : int
$from_resource  : string
$id  : int
$is_approved  : int
$is_hide  : int
$parent_feed_id  : int
$parent_module_id  : int
$privacy  : int
$privacy_id  : int
$privacy_list  : array<string|int, int>
$status  : string
$stream  : array<string|int, Stream>|null
$total_share  : int
$total_view  : int
$type_id  : string
$updated_at  : string|Carbon
$appends  : array<string|int, string>
$casts  : mixed
$fillable  : mixed
$table  : mixed

Methods

__toString()  : mixed
buildSeoData()  : array<string, mixed>
decrementAmount()  : int
decrementTotalItem()  : void
deletePrivacyStreams()  : void
Delete {item}_privacy_streams.
disableFeedSponsor()  : void
disableSponsor()  : void
enableFeedSponsor()  : void
enableSponsor()  : void
getIsApprovedAttribute()  : bool
getIsHideAttribute()  : bool
getItemAttribute()  : mixed
getKeepCommentItemRouterAttribute()  : bool
getOwnerAttribute()  : mixed
getOwnerEntityAttribute()  : mixed
getOwnerPendingMessage()  : string|null
getPrivacyListAttribute()  : array<string|int, mixed>|null
getThumbnail()  : string|null
getUserAttribute()  : mixed
getUserEntityAttribute()  : mixed
hiddenFeeds()  : BelongsToMany
history()  : HasMany
incrementAmount()  : int
incrementTotalItem()  : void
incrementTotalView()  : void
isApproved()  : bool
isDraft()  : mixed
isOwner()  : bool
check if $user is the owner of entity.
isOwnerPending()  : bool
isPublished()  : mixed
isSponsored()  : bool
isSponsoredInFeed()  : bool
isUser()  : bool
check if $user is the user (creator) of entity.
item()  : MorphTo|null
itemId()  : int
itemType()  : string
likes()  : MorphMany
loadPrivacyListAttribute()  : mixed
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
pinned()  : HasMany
pinnedFeeds()  : BelongsToMany
privacyItem()  : mixed
reactItem()  : self
Get indicate item handle privacy logic.
setIsApprovedAttribute()  : void
setPrivacyListAttribute()  : mixed
shares()  : MorphMany
stream()  : HasMany
streamPending()  : bool
syncPrivacyStreams()  : void
Create {item}_privacy_streams.
tagData()  : BelongsToMany
toApprovedNotification()  : array<string|int, mixed>
toDetailLink()  : string|null
toDetailUrl()  : string|null
toLink()  : string|null
toOGDescription()  : string|null
toOGImages()  : array<int, mixed>
toPendingNotification()  : array<string|int, mixed>|null
toRouter()  : string|null
toSavedItem()  : array<string, mixed>
[title, image, item_type_name, total_photo, user(UserEntity), link].
toSearchable()  : array<string|int, mixed>|null
toSitemapUrl()  : string|null
toSponsorData()  : array<string|int, mixed>|null
toTitle()  : string
toUrl()  : string|null
user()  : MorphTo
userEntity()  : BelongsTo
userId()  : int
userType()  : string
handleNegativeNumber()  : void
isDenied()  : Attribute
isPending()  : Attribute
isRemoved()  : Attribute
newFactory()  : FeedFactory
toPendingPreview()  : string|null

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'feed'

FROM_APP_RESOURCE

public mixed FROM_APP_RESOURCE = 'app'

FROM_FEED_RESOURCE

public mixed FROM_FEED_RESOURCE = 'feed'

IMPORT_ENTITY_TYPE

public mixed IMPORT_ENTITY_TYPE = 'activity_feed'
public mixed TO_LINK_REVIEW = '/settings/review'

Properties

$content

public string|null $content

$created_at

public string|Carbon $created_at

$feed_reference

public int $feed_reference

$from_resource

public string $from_resource

$is_approved

public int $is_approved

$is_hide

public int $is_hide
  • not autoload.

$parent_feed_id

public int $parent_feed_id

$parent_module_id

public int $parent_module_id

$privacy

public int $privacy

$privacy_id

public int $privacy_id

$status

public string $status

$total_share

public int $total_share

$total_view

public int $total_view

$type_id

public string $type_id
  • action type in activity_types

$updated_at

public string|Carbon $updated_at

$appends

protected array<string|int, string> $appends = []

$casts

protected mixed $casts = ['is_sponsor' => 'boolean']

$fillable

protected mixed $fillable = ['privacy', 'user_id', 'user_type', 'owner_id', 'owner_type', 'item_id', 'item_type', 'type_id', 'feed_reference', 'parent_feed_id', 'parent_module_id', 'content', 'total_like', 'total_comment', 'total_reply', 'total_view', 'total_share', 'is_sponsor', 'updated_at', 'status', 'from_resource']

$table

protected mixed $table = 'activity_feeds'

Methods

buildSeoData()

public buildSeoData(string $resolution, string $nameOrUrl, string $type, int $id) : array<string, mixed>
Parameters
$resolution : string
$nameOrUrl : string
$type : string
$id : int
Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Return values
array<string, mixed>

decrementAmount()

public decrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
$column : string
$amount : int = 1
Return values
int

deletePrivacyStreams()

Delete {item}_privacy_streams.

public deletePrivacyStreams() : void

disableFeedSponsor()

public disableFeedSponsor() : void

disableSponsor()

public disableSponsor() : void

enableFeedSponsor()

public enableFeedSponsor() : void

enableSponsor()

public enableSponsor() : void

getIsApprovedAttribute()

public getIsApprovedAttribute() : bool
Return values
bool

getIsHideAttribute()

public getIsHideAttribute() : bool
Return values
bool

getKeepCommentItemRouterAttribute()

public getKeepCommentItemRouterAttribute() : bool
Return values
bool

getOwnerEntityAttribute()

public getOwnerEntityAttribute() : mixed

getOwnerPendingMessage()

public getOwnerPendingMessage() : string|null
Return values
string|null

getPrivacyListAttribute()

public getPrivacyListAttribute() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getThumbnail()

public getThumbnail() : string|null
Return values
string|null

getUserEntityAttribute()

public getUserEntityAttribute() : mixed

hiddenFeeds()

public hiddenFeeds() : BelongsToMany
Return values
BelongsToMany

history()

public history() : HasMany
Return values
HasMany

incrementAmount()

public incrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
$column : string
$amount : int = 1
Return values
int

isApproved()

public isApproved() : bool
Return values
bool

isOwner()

check if $user is the owner of entity.

public isOwner(User $user) : bool
Parameters
$user : User
Return values
bool

isOwnerPending()

public isOwnerPending() : bool
Return values
bool

isSponsored()

public isSponsored() : bool
Return values
bool

isSponsoredInFeed()

public isSponsoredInFeed() : bool
Return values
bool

isUser()

check if $user is the user (creator) of entity.

public isUser(User $user) : bool
Parameters
$user : User
Return values
bool

item()

public item() : MorphTo|null
Return values
MorphTo|null

itemType()

public itemType() : string
Return values
string

likes()

public likes() : MorphMany
Return values
MorphMany

ownerEntity()

public ownerEntity() : BelongsTo
Return values
BelongsTo

ownerType()

public ownerType() : string
Return values
string

pinned()

public pinned() : HasMany
Return values
HasMany

pinnedFeeds()

public pinnedFeeds() : BelongsToMany
Return values
BelongsToMany

reactItem()

Get indicate item handle privacy logic.

public reactItem() : self
Return values
self

setIsApprovedAttribute()

public setIsApprovedAttribute(bool $value) : void
Parameters
$value : bool

setPrivacyListAttribute()

public setPrivacyListAttribute([array<string|int, mixed> $privacyList = [] ]) : mixed
Parameters
$privacyList : array<string|int, mixed> = []

shares()

public shares() : MorphMany
Return values
MorphMany

stream()

public stream() : HasMany
Return values
HasMany

streamPending()

public streamPending() : bool
Return values
bool

syncPrivacyStreams()

Create {item}_privacy_streams.

public syncPrivacyStreams(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

tagData()

public tagData() : BelongsToMany
Return values
BelongsToMany

toApprovedNotification()

public toApprovedNotification() : array<string|int, mixed>
Return values
array<string|int, mixed>
public toDetailLink() : string|null
Return values
string|null

toDetailUrl()

public toDetailUrl() : string|null
Return values
string|null
public toLink() : string|null
Tags
throws
AuthenticationException
Return values
string|null

toOGDescription()

public toOGDescription([User|null $context = null ]) : string|null
Parameters
$context : User|null = null
Return values
string|null

toOGImages()

public toOGImages() : array<int, mixed>
Return values
array<int, mixed>

toPendingNotification()

public toPendingNotification() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

toRouter()

public toRouter() : string|null
Tags
throws
AuthenticationException
Return values
string|null

toSavedItem()

[title, image, item_type_name, total_photo, user(UserEntity), link].

public toSavedItem() : array<string, mixed>
Return values
array<string, mixed>

toSearchable()

public toSearchable() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

toSitemapUrl()

public toSitemapUrl() : string|null
Return values
string|null

toSponsorData()

public toSponsorData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

toTitle()

public toTitle() : string
Return values
string

toUrl()

public toUrl() : string|null
Tags
throws
AuthenticationException
Return values
string|null

userEntity()

public userEntity() : BelongsTo
Return values
BelongsTo

userType()

public userType() : string
Return values
string

handleNegativeNumber()

protected handleNegativeNumber(string $column) : void
Parameters
$column : string

isDenied()

protected isDenied() : Attribute
Return values
Attribute

isPending()

protected isPending() : Attribute
Return values
Attribute

isRemoved()

protected isRemoved() : Attribute
Return values
Attribute

newFactory()

protected static newFactory() : FeedFactory
Return values
FeedFactory

toPendingPreview()

protected toPendingPreview() : string|null
Tags
throws
AuthenticationException
Return values
string|null

        
On this page

Search results