MetaFox

Comment extends Model
in package
implements ActionEntity, Content, HasApprove, HasTotalComment, HasTotalLike, HasItemMorph, HasTaggedFriend, HasHashTag, IsNotifyInterface Uses HasContent, HasOwnerMorph, HasUserMorph, HasItemMorph, HasFactory, HasTaggedFriendTrait

Class Comment.

Tags
mixin

Builder

SuppressWarnings

(PHPMD.CouplingBetweenObjects)

Table of Contents

Interfaces

ActionEntity
Interface ActionEntity.
Content
Interface Content.
HasApprove
Interface HasApprove
HasTotalComment
Interface HasTotalComment.
HasTotalLike
Interface HasTotalLike.
HasItemMorph
HasTaggedFriend
Interface HasTaggedFriend.
HasHashTag
Interface Entity.
IsNotifyInterface
Interface Entity.

Constants

ENTITY_TYPE  = 'comment'

Properties

$children  : Collection
$commentAttachment  : CommentAttachment|null
$commentHides  : Collection
$created_at  : string
$id  : int
$is_edited  : bool
$is_hidden  : bool
$is_spam  : bool
$item  : Content
$item_id  : int
$item_type  : string
$owner  : User
$owner_id  : int
$owner_type  : int
$parent_id  : int
$parentComment  : Comment
$tagged_user_ids  : mixed
$text  : string
$text_parsed  : string
$total_tag_friend  : int
$updated_at  : string
$user  : User
$user_id  : int
$user_type  : string
$casts  : array<string, mixed>
$fillable  : array<string|int, string>
$isReview  : int

Methods

__toString()  : mixed
children()  : HasMany
commentAttachment()  : HasOne
commentHides()  : HasMany
commentHistory()  : HasMany
deletePrivacyStreams()  : void
Delete {item}_privacy_streams.
disableFeedSponsor()  : void
disableSponsor()  : void
enableFeedSponsor()  : void
enableSponsor()  : void
factory()  : CommentFactory
getIsHiddenAttribute()  : bool
getItemAttribute()  : mixed
getOwnerAttribute()  : mixed
getOwnerEntityAttribute()  : mixed
getOwnerPendingMessage()  : string|null
This method is used for getting pending message if item is pending.
getParentCommentAttribute()  : mixed
getThumbnail()  : string|null
getTotalPendingUserReplyAttribute()  : int
getTotalTagFriendAttribute()  : int
getUserAttribute()  : mixed
getUserEntityAttribute()  : mixed
hasTagStream()  : bool
incrementOrDecrement()  : mixed
isApproved()  : mixed
isDraft()  : mixed
isOwner()  : bool
check if $user is the owner of entity.
isOwnerPending()  : bool
isPublished()  : mixed
isReview()  : int
isSponsored()  : bool
isSponsoredInFeed()  : bool
isUser()  : bool
check if $user is the user (creator) of entity.
item()  : MorphTo|null
itemId()  : int
itemType()  : string
likes()  : MorphMany
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
parentComment()  : BelongsTo
privacyItem()  : self|null
Get indicate item handle privacy logic.
reactItem()  : mixed
replies()  : HasMany
Add this method to support Factories.
setIsReview()  : mixed
shares()  : MorphMany
syncPrivacyStreams()  : void
Create {item}_privacy_streams.
tagData()  : BelongsToMany
toApprovedNotification()  : array<string|int, mixed>
toCallbackMessage()  : string
toFullLink()  : string|null
toLink()  : string|null
toMail()  : MailMessage
toNotification()  : array<string|int, mixed>|null
creator result must contain User owner.
toReportHeader()  : string
toReportTitle()  : string
toRouter()  : string|null
toSitemapUrl()  : string|null
toSponsorData()  : array<string|int, mixed>|null
toTagFriendLink()  : string
toTagFriendRouter()  : string
toTagFriendUrl()  : string
toTitle()  : string
toUrl()  : string|null
user()  : MorphTo
userEntity()  : BelongsTo
userHidden()  : HasOne
userId()  : int
userType()  : string
getOwnerNofitiables()  : array<string|int, mixed>
newFactory()  : CommentFactory
toCommentNotifiables()  : array<string|int, mixed>
toReplyNotifiables()  : array<string|int, mixed>

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'comment'

Properties

$children

public Collection $children

$commentHides

public Collection $commentHides

$created_at

public string $created_at

$owner_id

public int $owner_id
  • user id of content

$tagged_user_ids

public mixed $tagged_user_ids

$text_parsed

public string $text_parsed

$total_tag_friend

public int $total_tag_friend

$updated_at

public string $updated_at

$casts

protected array<string, mixed> $casts = ['is_approved' => 'boolean', 'is_spam' => 'boolean', 'is_edited' => 'boolean', 'tagged_user_ids' => 'array']

$fillable

protected array<string|int, string> $fillable = ['owner_id', 'owner_type', 'user_id', 'user_type', 'item_id', 'item_type', 'parent_id', 'is_approved', 'text', 'text_parsed', 'total_comment', 'total_pending_comment', 'total_like', 'is_edited', 'is_spam', 'tagged_user_ids']

Methods

children()

public children() : HasMany
Return values
HasMany

commentAttachment()

public commentAttachment() : HasOne
Return values
HasOne

commentHides()

public commentHides() : HasMany
Return values
HasMany

commentHistory()

public commentHistory() : HasMany
Return values
HasMany

deletePrivacyStreams()

Delete {item}_privacy_streams.

public deletePrivacyStreams() : void

disableFeedSponsor()

public disableFeedSponsor() : void

disableSponsor()

public disableSponsor() : void

enableFeedSponsor()

public enableFeedSponsor() : void

factory()

public static factory(mixed $parameters) : CommentFactory
Parameters
$parameters : mixed
Return values
CommentFactory

getIsHiddenAttribute()

public getIsHiddenAttribute() : bool
Return values
bool

getOwnerEntityAttribute()

public getOwnerEntityAttribute() : mixed

getOwnerPendingMessage()

This method is used for getting pending message if item is pending.

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

getParentCommentAttribute()

public getParentCommentAttribute() : mixed

getThumbnail()

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

getTotalPendingUserReplyAttribute()

public getTotalPendingUserReplyAttribute() : int
Return values
int

getTotalTagFriendAttribute()

public getTotalTagFriendAttribute() : int
Return values
int

getUserEntityAttribute()

public getUserEntityAttribute() : mixed

hasTagStream()

public hasTagStream() : bool
Tags
inheritDoc
Return values
bool

incrementOrDecrement()

public incrementOrDecrement(mixed $column, mixed $amount, mixed $extra, mixed $method) : mixed
Parameters
$column : mixed
$amount : mixed
$extra : mixed
$method : mixed

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

parentComment()

public parentComment() : BelongsTo
Return values
BelongsTo

privacyItem()

Get indicate item handle privacy logic.

public privacyItem() : self|null
Return values
self|null

replies()

Add this method to support Factories.

public replies() : HasMany
Return values
HasMany

shares()

public shares() : MorphMany
Return values
MorphMany

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 toFullLink() : string|null
Return values
string|null
public toLink() : string|null
Return values
string|null

toNotification()

creator result must contain User owner.

public toNotification() : array<string|int, mixed>|null

notification class.

Return values
array<string|int, mixed>|null

toReportHeader()

public toReportHeader() : string
Return values
string

toReportTitle()

public toReportTitle() : string
Return values
string

toRouter()

public toRouter() : string|null
Return values
string|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
public toTagFriendLink() : string
Return values
string

toTagFriendRouter()

public toTagFriendRouter() : string
Return values
string

toTagFriendUrl()

public toTagFriendUrl() : string
Return values
string

toTitle()

public toTitle() : string
Return values
string

toUrl()

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

userEntity()

public userEntity() : BelongsTo
Return values
BelongsTo

userHidden()

public userHidden() : HasOne
Return values
HasOne

userType()

public userType() : string
Return values
string

getOwnerNofitiables()

protected getOwnerNofitiables(User $context) : array<string|int, mixed>
Parameters
$context : User
Return values
array<string|int, mixed>

newFactory()

protected static newFactory() : CommentFactory
Return values
CommentFactory

toCommentNotifiables()

protected toCommentNotifiables(User $context) : array<string|int, mixed>
Parameters
$context : User
Return values
array<string|int, mixed>

toReplyNotifiables()

protected toReplyNotifiables(User $context) : array<string|int, mixed>
Parameters
$context : User
Return values
array<string|int, mixed>

        
On this page

Search results