MetaFox

Share extends Model
in package
implements Content, ActivityFeedSource, HasPrivacy, AppendPrivacyList, ResourcePostOnOwner, HasTaggedFriend, HasTotalView, HasTotalLike, HasTotalShare, HasTotalCommentWithReply, HasLocationCheckin, HasApprove, HasSavedItem, IsNotifyInterface Uses HasContent, HasFactory, HasUserMorph, HasOwnerMorph, HasItemMorph, AppendPrivacyListTrait, HasTaggedFriendTrait

Class Share.

Table of Contents

Interfaces

Content
Interface Content.
ActivityFeedSource
Interface ActivityFeedSource.
HasPrivacy
Interface HasPrivacy.
AppendPrivacyList
Interface AppendPrivacyList
ResourcePostOnOwner
Determine whenever a resource can be posted on another user: example photo, user_status,.
HasTaggedFriend
Interface HasTaggedFriend.
HasTotalView
Interface HasTotalView.
HasTotalLike
Interface HasTotalLike.
HasTotalShare
Interface HasTotalLike.
HasTotalCommentWithReply
Interface HasTotalComment.
HasLocationCheckin
Interface HasLocationCheckin.
HasApprove
Interface HasApprove
HasSavedItem
Interface HasSavedItem.
IsNotifyInterface
Interface Entity.

Constants

ENTITY_TYPE  = 'share'
FEED_POST_TYPE  = self::ENTITY_TYPE
IMPORT_ENTITY_TYPE  = 'activity_share'

Properties

$content  : string
$context_item  : Content|null
$context_item_id  : int
$context_item_type  : string
$created_at  : string
$id  : int
$item_id  : int
$item_type  : string
$owner_id  : int
$owner_type  : string
$parent_feed_id  : int
$parent_module_id  : string
$privacy  : int
$privacy_list  : array<string|int, int>
$total_view  : int
$updated_at  : string
$user_id  : int
$user_type  : string
$fillable  : array<string|int, string>
$isReview  : int
$table  : mixed

Methods

__toString()  : mixed
contextItem()  : MorphTo|null
contextItemId()  : int|null
contextItemType()  : string|null
deletePrivacyStreams()  : void
Delete {item}_privacy_streams.
disableFeedSponsor()  : void
disableSponsor()  : void
enableFeedSponsor()  : void
enableSponsor()  : void
factory()  : ShareFactory
getContextItemAttribute()  : mixed
getFeedContent()  : string|null
getItemAttribute()  : mixed
getKeepCommentItemRouterAttribute()  : bool
getOwnerAttribute()  : mixed
getOwnerEntityAttribute()  : mixed
getOwnerPendingMessage()  : string|null
This method is used for getting pending message if item is pending.
getPrivacyListAttribute()  : array<string|int, mixed>|null
getThumbnail()  : string|null
getUserAttribute()  : mixed
getUserEntityAttribute()  : mixed
hasTagStream()  : bool
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
loadPrivacyListAttribute()  : mixed
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
privacyItem()  : mixed
reactItem()  : mixed
setIsReview()  : mixed
setPrivacyListAttribute()  : mixed
shares()  : MorphMany
syncPrivacyStreams()  : void
Create {item}_privacy_streams.
toActivityFeed()  : FeedAction|null
toCallbackMessage()  : string
toFeedOGImages()  : array<int, mixed>
toFollowerNotification()  : array<string|int, mixed>|null
toLink()  : string|null
toLocation()  : array<string|int, mixed>
[address, lat, lng].
toMail()  : MailMessage
toNotification()  : array<string|int, mixed>|null
creator result must contain User owner.
toOGDescription()  : string|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
toTagFriendLink()  : string|null
toTagFriendRouter()  : string|null
toTagFriendUrl()  : string|null
toTitle()  : string
toUrl()  : string|null
user()  : MorphTo
userEntity()  : BelongsTo
userId()  : int
userType()  : string
newFactory()  : ShareFactory

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'share'

FEED_POST_TYPE

public mixed FEED_POST_TYPE = self::ENTITY_TYPE

IMPORT_ENTITY_TYPE

public mixed IMPORT_ENTITY_TYPE = 'activity_share'

Properties

$content

public string $content

$context_item_id

public int $context_item_id

$context_item_type

public string $context_item_type

$created_at

public string $created_at

$item_type

public string $item_type

$owner_id

public int $owner_id

$owner_type

public string $owner_type

$parent_feed_id

public int $parent_feed_id

$parent_module_id

public string $parent_module_id

$total_view

public int $total_view

$updated_at

public string $updated_at

$user_type

public string $user_type

$fillable

protected array<string|int, string> $fillable = ['user_id', 'user_type', 'owner_id', 'owner_type', 'item_id', 'item_type', 'parent_feed_id', 'parent_module_id', 'content', 'total_view', 'total_like', 'total_share', 'total_comment', 'total_reply', 'total_pending_comment', 'total_pending_reply', 'total_tag_friend', 'privacy', 'location_latitude', 'location_longitude', 'location_name', 'is_approved', 'context_item_type', 'context_item_id']

$table

protected mixed $table = 'activity_shares'

Methods

contextItem()

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

contextItemId()

public contextItemId() : int|null
Return values
int|null

contextItemType()

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

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) : ShareFactory
Parameters
$parameters : mixed
Return values
ShareFactory

getContextItemAttribute()

public getContextItemAttribute() : mixed

getFeedContent()

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

getKeepCommentItemRouterAttribute()

public getKeepCommentItemRouterAttribute() : 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

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

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

setPrivacyListAttribute()

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

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>

toFeedOGImages()

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

toFollowerNotification()

public toFollowerNotification() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null
public toLink() : string|null
Tags
throws
AuthenticationException
Return values
string|null

toLocation()

[address, lat, lng].

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

toNotification()

creator result must contain User owner.

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

notification class.

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

toOGDescription()

public toOGDescription([User|null $context = null ]) : string|null
Parameters
$context : User|null = null
Return values
string|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

newFactory()

protected static newFactory() : ShareFactory
Return values
ShareFactory

        
On this page

Search results