MetaFox

Album extends Model
in package
implements Content, AppendPrivacyList, ActivityFeedSource, HasResourceStream, HasFeature, HasSponsor, HasApprove, HasPrivacy, HasTotalLike, HasTotalShare, HasTotalPhoto, HasTotalItem, HasTotalCommentWithReply, HasSavedItem, HasGlobalSearch Uses HasContent, HasOwnerMorph, HasUserMorph, AppendPrivacyListTrait, HasNestedAttributes, HasFactory, SoftDeletes

Class PhotoAlbum.

Tags
mixin

Builder

SuppressWarnings

(PHPMD.CouplingBetweenObjects)

Table of Contents

Interfaces

Content
Interface Content.
AppendPrivacyList
Interface AppendPrivacyList
ActivityFeedSource
Interface ActivityFeedSource.
HasResourceStream
Interface HasResourceStream.
HasFeature
Interface HasFeature.
HasSponsor
Interface HasSponsor.
HasApprove
Interface HasApprove
HasPrivacy
Interface HasPrivacy.
HasTotalLike
Interface HasTotalLike.
HasTotalShare
Interface HasTotalLike.
HasTotalPhoto
Interface Entity.
HasTotalItem
Interface Entity.
HasTotalCommentWithReply
Interface HasTotalComment.
HasSavedItem
Interface HasSavedItem.
HasGlobalSearch
Interface HasGlobalSearch.

Constants

ALBUM_NAME  = [self::TIMELINE_ALBUM => 'photo::phrase.time_line_photos', self::COVER_ALBUM => 'photo::phrase.cover_photos', self::PROFILE_ALBUM => 'photo::phrase.profile_photo']
COVER_ALBUM  = 2
ENTITY_TYPE  = 'photo_album'
NORMAL_ALBUM  = 0
PROFILE_ALBUM  = 1
TIMELINE_ALBUM  = 3

Properties

$album_link  : string
$album_type  : int
$albumText  : AlbumText|null
$cover_photo_id  : int
$coverPhoto  : Photo|null
$created_at  : string
$groupedItems  : Collection
$id  : int
$is_approved  : int
$is_default  : bool
$is_featured  : int
$is_sponsor  : int
$items  : Collection
$module_id  : string
$name  : string
$nestedAttributes  : array<string, mixed>
$owner_id  : int
$owner_type  : string
$privacy  : int
$privacy_list  : array<string|int, int>
$sponsor_in_feed  : int
$total_comment  : int
$total_item  : int
$total_like  : int
$total_photo  : int
$total_share  : int
$total_video  : int
$ungroupedItems  : Collection
$updated_at  : string
$user_id  : int
$user_type  : string
$view_id  : int
$appends  : array<string|int, string>
$fillable  : mixed
$nestedAttributesFor  : array<string|int, mixed>
Defined nested attributes.
$table  : mixed

Methods

__toString()  : mixed
albumText()  : HasOne
buildSeoData()  : array<string, mixed>
coverPhoto()  : BelongsTo
deletePrivacyStreams()  : void
Delete {item}_privacy_streams.
disableFeedSponsor()  : void
disableSponsor()  : void
enableFeedSponsor()  : void
enableSponsor()  : void
factory()  : AlbumFactory
fill()  : static
Fill the model with an array of attributes.
getAlbumDetailSeoData()  : array<string, mixed>
getAlbumLinkAttribute()  : string
getDescriptionAttribute()  : string|null
getImagesAttribute()  : array<string|int, mixed>|null
getNameAttribute()  : string|null
getNestedAttributesFor()  : array<string|int, mixed>
Get accept nested attributes.
getOwnerAttribute()  : mixed
getOwnerEntityAttribute()  : mixed
getOwnerLinkAttribute()  : string
getOwnerNameAttribute()  : string
getOwnerPendingMessage()  : string|null
This method is used for getting pending message if item is pending.
getPrivacyListAttribute()  : array<string|int, mixed>|null
getThumbnail()  : string|null
getTotalVideoAttribute()  : int
getUserAttribute()  : mixed
getUserEntityAttribute()  : mixed
groupedItems()  : HasMany
isApproved()  : mixed
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.
items()  : HasMany
likes()  : MorphMany
loadPrivacyListAttribute()  : mixed
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
photos()  : HasMany
privacyItem()  : mixed
privacyStreams()  : HasMany
reactItem()  : mixed
save()  : bool
Save the model to the database.
setPrivacyListAttribute()  : mixed
shares()  : MorphMany
syncHasManyRelationAttribute()  : bool
Save the hasMany nested relation attributes to the database.
syncHasOneRelationAttribute()  : bool
syncPrivacyStreams()  : void
Create {item}_privacy_streams.
toActivityFeed()  : FeedAction|null
toFeedOGImages()  : array<int, mixed>
toLink()  : string|null
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
toTitle()  : string
toUrl()  : string|null
ungroupedItems()  : HasMany
user()  : MorphTo
userEntity()  : BelongsTo
userId()  : int
userType()  : string
allowDestroyNestedAttributes()  : bool
Check can we delete nested data.
isDefault()  : Attribute
isNormal()  : Attribute
isTimeline()  : Attribute
newFactory()  : AlbumFactory

Constants

ALBUM_NAME

public mixed ALBUM_NAME = [self::TIMELINE_ALBUM => 'photo::phrase.time_line_photos', self::COVER_ALBUM => 'photo::phrase.cover_photos', self::PROFILE_ALBUM => 'photo::phrase.profile_photo']

COVER_ALBUM

public mixed COVER_ALBUM = 2

ENTITY_TYPE

public mixed ENTITY_TYPE = 'photo_album'

NORMAL_ALBUM

public mixed NORMAL_ALBUM = 0

PROFILE_ALBUM

public mixed PROFILE_ALBUM = 1

TIMELINE_ALBUM

public mixed TIMELINE_ALBUM = 3

Properties

public string $album_link

$album_type

public int $album_type

$cover_photo_id

public int $cover_photo_id

$created_at

public string $created_at

$groupedItems

public Collection $groupedItems

$is_approved

public int $is_approved

$is_default

public bool $is_default
public int $is_featured

$is_sponsor

public int $is_sponsor

$items

public Collection $items

$module_id

public string $module_id

$nestedAttributes

public array<string, mixed> $nestedAttributes = ['albumText' => ['text', 'text_parsed']]

$owner_id

public int $owner_id

$owner_type

public string $owner_type

$sponsor_in_feed

public int $sponsor_in_feed

$total_comment

public int $total_comment

$total_item

public int $total_item

$total_like

public int $total_like

$total_photo

public int $total_photo

$total_share

public int $total_share

$total_video

public int $total_video

$ungroupedItems

public Collection $ungroupedItems

$updated_at

public string $updated_at

$user_type

public string $user_type

$appends

protected array<string|int, string> $appends = ['album_link', 'total_video', 'owner_link', 'owner_name']

$fillable

protected mixed $fillable = ['view_id', 'module_id', 'user_id', 'user_type', 'owner_id', 'owner_type', 'privacy', 'is_featured', 'is_sponsor', 'is_approved', 'sponsor_in_feed', 'name', 'album_type', 'total_photo', 'total_item', 'total_comment', 'total_like', 'total_share', 'created_at', 'updated_at', 'cover_photo_id']

$nestedAttributesFor

Defined nested attributes.

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

$table

protected mixed $table = 'photo_albums'

Methods

albumText()

public albumText() : HasOne
Return values
HasOne

buildSeoData()

public buildSeoData(string $resolution, string $nameOrUrl[, mixed|null $type = null ][, mixed|null $id = null ]) : array<string, mixed>
Parameters
$resolution : string
$nameOrUrl : string
$type : mixed|null = null
$id : mixed|null = null
Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Return values
array<string, mixed>

coverPhoto()

public coverPhoto() : BelongsTo
Return values
BelongsTo

deletePrivacyStreams()

Delete {item}_privacy_streams.

public deletePrivacyStreams() : void

disableFeedSponsor()

public disableFeedSponsor() : void

disableSponsor()

public disableSponsor() : void

enableFeedSponsor()

public enableFeedSponsor() : void

factory()

public static factory() : AlbumFactory
Return values
AlbumFactory

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

getAlbumDetailSeoData()

public getAlbumDetailSeoData(string $resolution) : array<string, mixed>
Parameters
$resolution : string
Return values
array<string, mixed>

getAlbumLinkAttribute()

public getAlbumLinkAttribute() : string
Return values
string

getDescriptionAttribute()

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

getImagesAttribute()

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

getNameAttribute()

public getNameAttribute(string|null $name) : string|null
Parameters
$name : string|null
Return values
string|null

getNestedAttributesFor()

Get accept nested attributes.

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

getOwnerEntityAttribute()

public getOwnerEntityAttribute() : mixed

getOwnerLinkAttribute()

public getOwnerLinkAttribute() : string
Return values
string

getOwnerNameAttribute()

public getOwnerNameAttribute() : string
Return values
string

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

getTotalVideoAttribute()

public getTotalVideoAttribute() : int
Return values
int

getUserEntityAttribute()

public getUserEntityAttribute() : mixed

groupedItems()

public groupedItems() : HasMany
Return values
HasMany

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

items()

public items() : HasMany
Return values
HasMany

likes()

public likes() : MorphMany
Return values
MorphMany

ownerEntity()

public ownerEntity() : BelongsTo
Return values
BelongsTo

ownerType()

public ownerType() : string
Return values
string

photos()

public photos() : HasMany
Return values
HasMany

privacyStreams()

public privacyStreams() : HasMany
Return values
HasMany

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>

toFeedOGImages()

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

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

ungroupedItems()

public ungroupedItems() : HasMany
Return values
HasMany

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

isDefault()

protected isDefault() : Attribute
Return values
Attribute

isNormal()

protected isNormal() : Attribute
Return values
Attribute

isTimeline()

protected isTimeline() : Attribute
Return values
Attribute

newFactory()

protected static newFactory() : AlbumFactory
Return values
AlbumFactory

        
On this page

Search results