PhotoGroup
extends Model
in package
implements
Content, ResourcePostOnOwner, ActivityFeedSourceCanEditAttachment, AppendPrivacyList, HasPrivacy, HasFeature, HasSponsor, HasSponsorInFeed, HasTotalLike, HasTotalShare, HasTotalCommentWithReply, HasTotalView, HasTotalPhoto, HasTotalItem, HasLocationCheckin, HasSavedItem, HasTaggedFriend, HasApprove
Uses
HasContent, HasFactory, HasAmountsTrait, HasUserMorph, HasOwnerMorph, AppendPrivacyListTrait, HasTaggedFriendTrait
Class PhotoGroup.
Tags
Table of Contents
Interfaces
- Content
- Interface Content.
- ResourcePostOnOwner
- Determine whenever a resource can be posted on another user: example photo, user_status,.
- ActivityFeedSourceCanEditAttachment
- Interface ActivityFeedSourceCanEditAttachment
- AppendPrivacyList
- Interface AppendPrivacyList
- HasPrivacy
- Interface HasPrivacy.
- HasFeature
- Interface HasFeature.
- HasSponsor
- Interface HasSponsor.
- HasSponsorInFeed
- Interface HasSponsor.
- HasTotalLike
- Interface HasTotalLike.
- HasTotalShare
- Interface HasTotalLike.
- HasTotalCommentWithReply
- Interface HasTotalComment.
- HasTotalView
- Interface HasTotalView.
- HasTotalPhoto
- Interface Entity.
- HasTotalItem
- Interface Entity.
- HasLocationCheckin
- Interface HasLocationCheckin.
- HasSavedItem
- Interface HasSavedItem.
- HasTaggedFriend
- Interface HasTaggedFriend.
- HasApprove
- Interface HasApprove
Constants
- ENTITY_TYPE = 'photo_set'
- FEED_POST_TYPE = self::ENTITY_TYPE
- PHOTO_ALBUM_UPDATE_TYPE = 'update_photo_album'
Properties
- $album : Album|null
- $album_id : int
- $album_link : string
- $album_name : string
- $content : string
- $created_at : string
- $id : int
- $items : Collection
- $privacy_list : array<string|int, int>
- $statistic : CollectionStatistic|null
- $total_item : int
- $updated_at : string
- $appends : array<string|int, string>
- $fillable : mixed
- $isReview : int
- $with : array<string|int, string>
Methods
- __toString() : mixed
- album() : BelongsTo
- approvedItems() : HasMany
- decreaseStatisticAmount() : int
- decrementAmount() : int
- decrementTotalItem() : void
- deletePrivacyStreams() : void
- Delete {item}_privacy_streams.
- disableFeedSponsor() : void
- disableSponsor() : void
- enableFeedSponsor() : void
- enableSponsor() : void
- factory() : PhotoGroupFactory
- getAlbumLinkAttribute() : string
- getAlbumNameAttribute() : string
- getFeedContent() : string|null
- getForceSaveItemAttribute() : bool
- getKeepCommentItemRouterAttribute() : bool
- getOwnerAttribute() : mixed
- getOwnerEntityAttribute() : mixed
- getOwnerPendingMessage() : string|null
- getPrivacyListAttribute() : array<string|int, mixed>|null
- getThumbnail() : string|null
- getUserAttribute() : mixed
- getUserEntityAttribute() : mixed
- hasTagStream() : bool
- increaseStatisticAmount() : int
- incrementAmount() : int
- incrementTotalItem() : void
- incrementTotalView() : void
- 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.
- items() : HasMany
- likes() : MorphMany
- loadPrivacyListAttribute() : mixed
- owner() : MorphTo
- ownerEntity() : BelongsTo
- ownerId() : int
- ownerType() : string
- pendingItems() : HasMany
- privacyItem() : mixed
- processingItems() : HasMany
- reactItem() : mixed
- setIsReview() : mixed
- setPrivacyListAttribute() : mixed
- shares() : MorphMany
- statistic() : MorphOne
- 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
- toRouter() : string|null
- toSavedItem() : array<string, mixed>
- [title, image, item_type_name, total_photo, user(UserEntity), link].
- 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
- handleNegativeNumber() : void
- newFactory() : PhotoGroupFactory
- toSavedItemTitle() : string
- toSaveItemTypeName() : string
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'photo_set'
FEED_POST_TYPE
public
mixed
FEED_POST_TYPE
= self::ENTITY_TYPE
PHOTO_ALBUM_UPDATE_TYPE
public
mixed
PHOTO_ALBUM_UPDATE_TYPE
= 'update_photo_album'
Properties
$album
public
Album|null
$album
$album_id
public
int
$album_id
$album_link
public
string
$album_link
$album_name
public
string
$album_name
$content
public
string
$content
$created_at
public
string
$created_at
$id
public
int
$id
$items
public
Collection
$items
$privacy_list
public
array<string|int, int>
$privacy_list
$statistic
public
CollectionStatistic|null
$statistic
$total_item
public
int
$total_item
$updated_at
public
string
$updated_at
$appends
protected
array<string|int, string>
$appends
= ['album_name', 'album_link']
$fillable
protected
mixed
$fillable
= ['album_id', 'total_item', 'content', 'user_id', 'user_type', 'owner_id', 'owner_type', 'privacy', 'total_view', 'total_like', 'total_share', 'location_name', 'location_latitude', 'location_longitude', 'is_featured', 'is_sponsor', 'is_approved', 'total_tag_friend', 'total_pending_reply', 'total_comment', 'total_reply', 'total_pending_comment']
$isReview
protected
int
$isReview
$with
protected
array<string|int, string>
$with
= ['statistic']
Methods
__toString()
public
__toString() : mixed
album()
public
album() : BelongsTo
Return values
BelongsToapprovedItems()
public
approvedItems() : HasMany
Return values
HasManydecreaseStatisticAmount()
public
decreaseStatisticAmount(string $itemType[, int $amount = 1 ]) : int
Parameters
- $itemType : string
- $amount : int = 1
Return values
intdecrementAmount()
public
decrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : string
- $amount : int = 1
Return values
intdecrementTotalItem()
public
decrementTotalItem() : void
deletePrivacyStreams()
Delete {item}_privacy_streams.
public
deletePrivacyStreams() : void
disableFeedSponsor()
public
disableFeedSponsor() : void
disableSponsor()
public
disableSponsor() : void
enableFeedSponsor()
public
enableFeedSponsor() : void
enableSponsor()
public
enableSponsor() : void
factory()
public
static factory() : PhotoGroupFactory
Return values
PhotoGroupFactorygetAlbumLinkAttribute()
public
getAlbumLinkAttribute() : string
Return values
stringgetAlbumNameAttribute()
public
getAlbumNameAttribute() : string
Return values
stringgetFeedContent()
public
getFeedContent() : string|null
Return values
string|nullgetForceSaveItemAttribute()
public
getForceSaveItemAttribute() : bool
Return values
boolgetKeepCommentItemRouterAttribute()
public
getKeepCommentItemRouterAttribute() : bool
Return values
boolgetOwnerAttribute()
public
getOwnerAttribute() : mixed
getOwnerEntityAttribute()
public
getOwnerEntityAttribute() : mixed
getOwnerPendingMessage()
public
getOwnerPendingMessage() : string|null
Return values
string|nullgetPrivacyListAttribute()
public
getPrivacyListAttribute() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetThumbnail()
public
getThumbnail() : string|null
Return values
string|nullgetUserAttribute()
public
getUserAttribute() : mixed
getUserEntityAttribute()
public
getUserEntityAttribute() : mixed
hasTagStream()
public
hasTagStream() : bool
Return values
boolincreaseStatisticAmount()
public
increaseStatisticAmount(string $itemType[, int $amount = 1 ]) : int
Parameters
- $itemType : string
- $amount : int = 1
Return values
intincrementAmount()
public
incrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : string
- $amount : int = 1
Return values
intincrementTotalItem()
public
incrementTotalItem() : void
incrementTotalView()
public
incrementTotalView() : void
isApproved()
public
isApproved() : mixed
isDraft()
public
isDraft() : mixed
isOwner()
check if $user is the owner of entity.
public
isOwner(User $user) : bool
Parameters
- $user : User
Return values
boolisOwnerPending()
public
isOwnerPending() : bool
Return values
boolisPublished()
public
isPublished() : mixed
isReview()
public
isReview() : int
Return values
intisSponsored()
public
isSponsored() : bool
Return values
boolisSponsoredInFeed()
public
isSponsoredInFeed() : bool
Return values
boolisUser()
check if $user is the user (creator) of entity.
public
isUser(User $user) : bool
Parameters
- $user : User
Return values
boolitems()
public
items() : HasMany
Return values
HasManylikes()
public
likes() : MorphMany
Return values
MorphManyloadPrivacyListAttribute()
public
loadPrivacyListAttribute() : mixed
owner()
public
owner() : MorphTo
Return values
MorphToownerEntity()
public
ownerEntity() : BelongsTo
Return values
BelongsToownerId()
public
ownerId() : int
Return values
intownerType()
public
ownerType() : string
Return values
stringpendingItems()
public
pendingItems() : HasMany
Return values
HasManyprivacyItem()
public
privacyItem() : mixed
processingItems()
public
processingItems() : HasMany
Return values
HasManyreactItem()
public
reactItem() : mixed
setIsReview()
public
setIsReview(int $isReview) : mixed
Parameters
- $isReview : int
setPrivacyListAttribute()
public
setPrivacyListAttribute([array<string|int, mixed> $privacyList = [] ]) : mixed
Parameters
- $privacyList : array<string|int, mixed> = []
shares()
public
shares() : MorphMany
Return values
MorphManystatistic()
public
statistic() : MorphOne
Return values
MorphOnesyncPrivacyStreams()
Create {item}_privacy_streams.
public
syncPrivacyStreams(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
toActivityFeed()
public
toActivityFeed() : FeedAction|null
Return values
FeedAction|nulltoCallbackMessage()
public
toCallbackMessage(UserEntity $user, UserEntity $owner[, bool $isMention = false ]) : string
Parameters
- $user : UserEntity
- $owner : UserEntity
- $isMention : bool = false
Return values
stringtoFeedOGImages()
public
toFeedOGImages() : array<int, mixed>
Return values
array<int, mixed>toFollowerNotification()
public
toFollowerNotification() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nulltoLink()
public
toLink() : string|null
Return values
string|nulltoLocation()
[address, lat, lng].
public
toLocation() : array<string|int, mixed>
Return values
array<string|int, mixed>toMail()
public
toMail(MailMessage $service, UserEntity|null $user, UserEntity|null $owner[, bool $isMention = false ]) : MailMessage
Parameters
- $service : MailMessage
- $user : UserEntity|null
- $owner : UserEntity|null
- $isMention : bool = false
Return values
MailMessagetoRouter()
public
toRouter() : string|null
Return values
string|nulltoSavedItem()
[title, image, item_type_name, total_photo, user(UserEntity), link].
public
toSavedItem() : array<string, mixed>
Return values
array<string, mixed>toSitemapUrl()
public
toSitemapUrl() : string|null
Return values
string|nulltoSponsorData()
public
toSponsorData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nulltoTagFriendLink()
public
toTagFriendLink() : string|null
Return values
string|nulltoTagFriendRouter()
public
toTagFriendRouter() : string|null
Return values
string|nulltoTagFriendUrl()
public
toTagFriendUrl() : string|null
Return values
string|nulltoTitle()
public
toTitle() : string
Return values
stringtoUrl()
public
toUrl() : string|null
Return values
string|nulluser()
public
user() : MorphTo
Return values
MorphTouserEntity()
public
userEntity() : BelongsTo
Return values
BelongsTouserId()
public
userId() : int
Return values
intuserType()
public
userType() : string
Return values
stringhandleNegativeNumber()
protected
handleNegativeNumber(string $column) : void
Parameters
- $column : string
newFactory()
protected
static newFactory() : PhotoGroupFactory
Return values
PhotoGroupFactorytoSavedItemTitle()
protected
toSavedItemTitle() : string
Return values
stringtoSaveItemTypeName()
protected
toSaveItemTypeName() : string