MetaFox

Photo extends Model
in package
implements Media, ActivityFeedSourceCanEditAttachment, ActivityFeedForm, AppendPrivacyList, HasPrivacy, HasResourceStream, HasResourceCategory, HasApprove, HasFeature, HasSponsor, HasSponsorInFeed, HasTotalLike, HasTotalShare, HasTotalCommentWithReply, HasTotalView, HasLocationCheckin, HasThumbnail, HasTaggedFriendWithPosition, HasSavedItem, HasGlobalSearch, HasHashTag Uses HasContent, HasOwnerMorph, HasUserMorph, AppendPrivacyListTrait, HasNestedAttributes, HasFactory, HasThumbnailTrait, HasTaggedFriendTrait, SoftDeletes, HasMedia

Class Photo.

Tags
SuppressWarnings

(PHPMD.CouplingBetweenObjects)

SuppressWarnings

(PHPMD.NPathComplexity)

mixin

Builder

Table of Contents

Interfaces

Media
Interface Media.
ActivityFeedSourceCanEditAttachment
Interface ActivityFeedSourceCanEditAttachment
ActivityFeedForm
Interface ActivityFeedForm.
AppendPrivacyList
Interface AppendPrivacyList
HasPrivacy
Interface HasPrivacy.
HasResourceStream
Interface HasResourceStream.
HasResourceCategory
Interface HasResourceCategory.
HasApprove
Interface HasApprove
HasFeature
Interface HasFeature.
HasSponsor
Interface HasSponsor.
HasSponsorInFeed
Interface HasSponsor.
HasTotalLike
Interface HasTotalLike.
HasTotalShare
Interface HasTotalLike.
HasTotalCommentWithReply
Interface HasTotalComment.
HasTotalView
Interface HasTotalView.
HasLocationCheckin
Interface HasLocationCheckin.
HasThumbnail
Interface HasThumbnail.
HasTaggedFriendWithPosition
Interface HasTaggedFriendWithPosition.
HasSavedItem
Interface HasSavedItem.
HasGlobalSearch
Interface HasGlobalSearch.
HasHashTag
Interface Entity.

Constants

ENTITY_TYPE  = 'photo'
IS_PENDING  = 0
TYPE_AVATAR  = 'avatar'
TYPE_COVER  = 'cover'
TYPE_NORMAL  = 'normal'

Properties

$activeCategories  : Collection
$activity_feed  : Feed
$album  : Album
$album_id  : int
$album_type  : int
$allow_rate  : int
$categories  : Collection
$content  : string
$created_at  : string
$file_id  : mixed
$fileItem  : StorageFile
$group  : PhotoGroup|null
$group_id  : int
$id  : int
$image_file_id  : string
$is_approved  : int
$is_cover  : bool
$is_cover_photo  : bool
$is_featured  : int
$is_profile_photo  : bool
$is_sponsor  : int
$is_temp  : int
$item_type  : string
$location_latitude  : int
$location_longitude  : int
$location_name  : string
$mature  : int
$module_id  : string
$nestedAttributes  : array<int|string, array<int, string>|string>
$ordering  : int
$owner  : User
$owner_id  : int
$owner_type  : string
$photo_type  : string
$photoInfo  : PhotoInfo|null
$privacy  : string
$privacy_list  : array<string|int, int>
$sponsor_in_feed  : bool
$title  : string
$total_comment  : int
$total_dislike  : int
$total_download  : int
$total_like  : int
$total_rating  : float
$total_share  : int
$total_tag  : int
$total_view  : int
$total_vote  : int
$type_id  : int
$updated_at  : string
$user  : User
$user_id  : int
$user_type  : string
$appends  : array<string|int, string>
$casts  : array<string, string>
$fillable  : array<string|int, string>
$isReview  : int
$nestedAttributesFor  : array<string|int, mixed>
Defined nested attributes.

Methods

__toString()  : mixed
activeCategories()  : BelongsToMany
album()  : BelongsTo
albumItem()  : MorphOne
categories()  : BelongsToMany
deletePrivacyStreams()  : void
Delete {item}_privacy_streams.
disableFeedSponsor()  : void
disableSponsor()  : void
enableFeedSponsor()  : void
enableSponsor()  : void
factory()  : PhotoFactory
fileItem()  : HasOne
fill()  : static
Fill the model with an array of attributes.
getDownloadUrlAttribute()  : string
getFeedContent()  : string|null
getImageAttribute()  : string|null
getImagesAttribute()  : array<string|int, mixed>|null
getImageUrlAttribute()  : string
getIsCoverAttribute()  : bool
getIsCoverPhotoAttribute()  : bool
getIsFailedAttribute()  : bool
getIsProcessingAttribute()  : bool
getIsProfilePhotoAttribute()  : bool
getIsSuccessAttribute()  : bool
getNestedAttributesFor()  : array<string|int, mixed>
Get accept nested attributes.
getOwnerAttribute()  : mixed
getOwnerEntityAttribute()  : mixed
getOwnerPendingMessage()  : string|null
This method is used for getting pending message if item is pending.
getPhotoTypeAttribute()  : string
getPrivacyListAttribute()  : array<string|int, mixed>|null
getSharedFeedTypeIdAttribute()  : string|null
getSizes()  : array<string|int, mixed>
getThumbnail()  : string|null
getUnsupportChangeFeedPrivacyAttribute()  : bool
getUserAttribute()  : mixed
getUserEntityAttribute()  : mixed
group()  : BelongsTo
groupItem()  : MorphOne
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.
likes()  : MorphMany
loadPrivacyListAttribute()  : mixed
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
photoInfo()  : HasOne
privacyItem()  : mixed
privacyStreams()  : HasMany
reactItem()  : mixed
save()  : bool
Save the model to the database.
setIsReview()  : mixed
setPrivacyListAttribute()  : mixed
shares()  : MorphMany
syncHasManyRelationAttribute()  : bool
Save the hasMany nested relation attributes to the database.
syncHasOneRelationAttribute()  : bool
syncPrivacyStreams()  : void
Create {item}_privacy_streams.
tagData()  : BelongsToMany
toActivityFeed()  : FeedAction|null
toApprovedNotification()  : array<int, mixed>
toCallbackMessage()  : string
toFeedOGImages()  : array<int, mixed>
toFollowerCallbackMessage()  : string|null
toFollowerNotification()  : array<string|int, mixed>|null
toLink()  : string|null
toLocation()  : array<int, mixed>
[address, lat, lng].
toMail()  : MailMessage
toOGDescription()  : string|null
toRouter()  : string|null
toSavedItem()  : array<string, mixed>
[title, image, item_type_name, total_photo, user(UserEntity), link].
toSearchable()  : array<string, 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
allowDestroyNestedAttributes()  : bool
Check can we delete nested data.
booted()  : mixed
getInProcessValue()  : int
newFactory()  : PhotoFactory
handleMessageForGender()  : string

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'photo'

IS_PENDING

public mixed IS_PENDING = 0

TYPE_AVATAR

public mixed TYPE_AVATAR = 'avatar'

TYPE_COVER

public mixed TYPE_COVER = 'cover'

TYPE_NORMAL

public mixed TYPE_NORMAL = 'normal'

Properties

$activeCategories

public Collection $activeCategories

$album_id

public int $album_id

$album_type

public int $album_type

$allow_rate

public int $allow_rate

$categories

public Collection $categories

$content

public string $content

$created_at

public string $created_at

$file_id

public mixed $file_id

$group_id

public int $group_id

$image_file_id

public string $image_file_id

$is_approved

public int $is_approved

$is_cover

public bool $is_cover

$is_cover_photo

public bool $is_cover_photo
public int $is_featured

$is_profile_photo

public bool $is_profile_photo

$is_sponsor

public int $is_sponsor

$item_type

public string $item_type

$location_latitude

public int $location_latitude

$location_longitude

public int $location_longitude

$location_name

public string $location_name

$module_id

public string $module_id

$nestedAttributes

public array<int|string, array<int, string>|string> $nestedAttributes = ['categories', 'photoInfo' => ['text', 'text_parsed']]

$ordering

public int $ordering

$owner_id

public int $owner_id

$owner_type

public string $owner_type

$photo_type

public string $photo_type

$privacy

public string $privacy

$sponsor_in_feed

public bool $sponsor_in_feed

$total_comment

public int $total_comment

$total_dislike

public int $total_dislike

$total_download

public int $total_download

$total_like

public int $total_like

$total_rating

public float $total_rating

$total_share

public int $total_share

$total_tag

public int $total_tag

$total_view

public int $total_view

$total_vote

public int $total_vote

$updated_at

public string $updated_at

$user_type

public string $user_type

$appends

protected array<string|int, string> $appends = ['is_cover', 'is_cover_photo', 'is_profile_photo']

$casts

protected array<string, string> $casts = ['is_featured' => 'boolean', 'is_sponsor' => 'boolean', 'is_approved' => 'boolean', 'is_temp' => 'boolean', 'sponsor_in_feed' => 'boolean']

$fillable

protected array<string|int, string> $fillable = ['album_id', 'album_type', 'group_id', 'type_id', 'title', 'item_type', 'user_id', 'user_type', 'owner_id', 'owner_type', 'privacy', 'total_view', 'total_like', 'total_dislike', 'total_share', 'total_tag', 'total_download', 'image_file_id', 'total_vote', 'total_rating', 'mature', 'allow_rate', 'is_featured', 'is_sponsor', 'is_approved', 'location_name', 'location_latitude', 'location_longitude', 'content', 'is_temp', 'ordering', 'sponsor_in_feed', 'updated_at', 'created_at', 'in_process', 'total_tag_friend', 'total_pending_reply', 'total_comment', 'total_reply', 'total_pending_comment']

$nestedAttributesFor

Defined nested attributes.

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

Methods

activeCategories()

public activeCategories() : BelongsToMany
Return values
BelongsToMany

album()

public album() : BelongsTo
Return values
BelongsTo

albumItem()

public albumItem() : MorphOne
Return values
MorphOne

categories()

public categories() : BelongsToMany
Return values
BelongsToMany

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

fileItem()

public fileItem() : HasOne
Return values
HasOne

fill()

Fill the model with an array of attributes.

public fill(array<string|int, mixed> $attributes) : static
Parameters
$attributes : array<string|int, mixed>
Tags
throws
MassAssignmentException
Return values
static

getDownloadUrlAttribute()

public getDownloadUrlAttribute() : string
Return values
string

getFeedContent()

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

getImageAttribute()

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

getImagesAttribute()

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

getImageUrlAttribute()

public getImageUrlAttribute() : string
Return values
string

getIsCoverAttribute()

public getIsCoverAttribute() : bool
Return values
bool

getIsCoverPhotoAttribute()

public getIsCoverPhotoAttribute() : bool
Return values
bool

getIsFailedAttribute()

public getIsFailedAttribute() : bool
Return values
bool

getIsProcessingAttribute()

public getIsProcessingAttribute() : bool
Return values
bool

getIsProfilePhotoAttribute()

public getIsProfilePhotoAttribute() : bool
Return values
bool

getIsSuccessAttribute()

public getIsSuccessAttribute() : bool
Return values
bool

getNestedAttributesFor()

Get accept nested attributes.

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

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

getPhotoTypeAttribute()

public getPhotoTypeAttribute() : string
Return values
string

getPrivacyListAttribute()

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

getSharedFeedTypeIdAttribute()

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

getSizes()

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

getThumbnail()

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

getUnsupportChangeFeedPrivacyAttribute()

public getUnsupportChangeFeedPrivacyAttribute() : bool
Return values
bool

getUserEntityAttribute()

public getUserEntityAttribute() : mixed

group()

public group() : BelongsTo
Return values
BelongsTo

groupItem()

public groupItem() : MorphOne
Return values
MorphOne

hasTagStream()

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

likes()

public likes() : MorphMany
Return values
MorphMany

ownerEntity()

public ownerEntity() : BelongsTo
Return values
BelongsTo

ownerType()

public ownerType() : string
Return values
string

photoInfo()

public photoInfo() : HasOne
Return values
HasOne

privacyStreams()

public privacyStreams() : HasMany
Return values
HasMany

reactItem()

public reactItem() : mixed

save()

Save the model to the database.

public save([array<string|int, mixed> $options = [] ]) : bool
Parameters
$options : array<string|int, mixed> = []
Tags
throws
Exception
Return values
bool

setPrivacyListAttribute()

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

shares()

public shares() : MorphMany
Return values
MorphMany

syncHasManyRelationAttribute()

Save the hasMany nested relation attributes to the database.

public syncHasManyRelationAttribute(HasMany $relation, array<string|int, mixed> $params) : bool
Parameters
$relation : HasMany
$params : array<string|int, mixed>
Return values
bool

syncHasOneRelationAttribute()

public syncHasOneRelationAttribute(HasOne $relation, array<string|int, mixed> $params) : bool
Parameters
$relation : HasOne
$params : array<string|int, mixed>
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

toActivityFeed()

public toActivityFeed() : FeedAction|null
Tags
inerhitDoc
SuppressWarnings

(PHPMD.CyclomaticComplexity)

Return values
FeedAction|null

toApprovedNotification()

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

toFeedOGImages()

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

toFollowerCallbackMessage()

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

toFollowerNotification()

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

toLocation()

[address, lat, lng].

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

toOGDescription()

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

toRouter()

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

userEntity()

public userEntity() : BelongsTo
Return values
BelongsTo

userType()

public userType() : string
Return values
string

allowDestroyNestedAttributes()

Check can we delete nested data.

protected allowDestroyNestedAttributes(array<string|int, mixed> $params) : bool
Parameters
$params : array<string|int, mixed>
Return values
bool

booted()

protected static booted() : mixed

getInProcessValue()

protected getInProcessValue([bool $default = true ]) : int
Parameters
$default : bool = true
Return values
int

newFactory()

protected static newFactory() : PhotoFactory
Return values
PhotoFactory

handleMessageForGender()

private handleMessageForGender(int $gender, string $yourName) : string
Parameters
$gender : int
$yourName : string
Return values
string

        
On this page

Search results