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
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
$album_link
    public
        string
    $album_link
    
    
    
    
$album_type
    public
        int
    $album_type
    
    
    
    
$albumText
    public
        AlbumText|null
    $albumText
    
    
    
    
$cover_photo_id
    public
        int
    $cover_photo_id
    
    
    
    
$coverPhoto
    public
        Photo|null
    $coverPhoto
    
    
    
    
$created_at
    public
        string
    $created_at
    
    
    
    
$groupedItems
    public
        Collection
    $groupedItems
    
    
    
    
$id
    public
        int
    $id
    
    
    
    
$is_approved
    public
        int
    $is_approved
    
    
    
    
$is_default
    public
        bool
    $is_default
    
    
    
    
$is_featured
    public
        int
    $is_featured
    
    
    
    
$is_sponsor
    public
        int
    $is_sponsor
    
    
    
    
$items
    public
        Collection
    $items
    
    
    
    
$module_id
    public
        string
    $module_id
    
    
    
    
$name
    public
        string
    $name
    
    
    
    
$nestedAttributes
    public
        array<string, mixed>
    $nestedAttributes
     = ['albumText' => ['text', 'text_parsed']]
    
    
    
$owner_id
    public
        int
    $owner_id
    
    
    
    
$owner_type
    public
        string
    $owner_type
    
    
    
    
$privacy
    public
        int
    $privacy
    
    
    
    
$privacy_list
    public
        array<string|int, int>
    $privacy_list
    
    
    
    
$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_id
    public
        int
    $user_id
    
    
    
    
$user_type
    public
        string
    $user_type
    
    
    
    
$view_id
    public
        int
    $view_id
    
    
    
    
$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
__toString()
    public
                    __toString() : mixed
    albumText()
    public
                    albumText() : HasOne
    Return values
HasOnebuildSeoData()
    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
Return values
array<string, mixed>coverPhoto()
    public
                    coverPhoto() : BelongsTo
    Return values
BelongsTodeletePrivacyStreams()
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() : AlbumFactory
    Return values
AlbumFactoryfill()
Fill the model with an array of attributes.
    public
                    fill(array<string|int, mixed> $attributes) : static
    Parameters
- $attributes : array<string|int, mixed>
 
Tags
Return values
staticgetAlbumDetailSeoData()
    public
                    getAlbumDetailSeoData(string $resolution) : array<string, mixed>
    Parameters
- $resolution : string
 
Return values
array<string, mixed>getAlbumLinkAttribute()
    public
                    getAlbumLinkAttribute() : string
    Return values
stringgetDescriptionAttribute()
    public
                    getDescriptionAttribute() : string|null
    Return values
string|nullgetImagesAttribute()
    public
                    getImagesAttribute() : array<string|int, mixed>|null
    Return values
array<string|int, mixed>|nullgetNameAttribute()
    public
                    getNameAttribute(string|null $name) : string|null
    Parameters
- $name : string|null
 
Return values
string|nullgetNestedAttributesFor()
Get accept nested attributes.
    public
                    getNestedAttributesFor() : array<string|int, mixed>
    Return values
array<string|int, mixed>getOwnerAttribute()
    public
                    getOwnerAttribute() : mixed
    getOwnerEntityAttribute()
    public
                    getOwnerEntityAttribute() : mixed
    getOwnerLinkAttribute()
    public
                    getOwnerLinkAttribute() : string
    Return values
stringgetOwnerNameAttribute()
    public
                    getOwnerNameAttribute() : string
    Return values
stringgetOwnerPendingMessage()
This method is used for getting pending message if item is pending.
    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|nullgetTotalVideoAttribute()
    public
                    getTotalVideoAttribute() : int
    Return values
intgetUserAttribute()
    public
                    getUserAttribute() : mixed
    getUserEntityAttribute()
    public
                    getUserEntityAttribute() : mixed
    groupedItems()
    public
                    groupedItems() : HasMany
    Return values
HasManyisApproved()
    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
    isSponsored()
    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
stringphotos()
    public
                    photos() : HasMany
    Return values
HasManyprivacyItem()
    public
                    privacyItem() : mixed
    privacyStreams()
    public
                    privacyStreams() : HasMany
    Return values
HasManyreactItem()
    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
Return values
boolsetPrivacyListAttribute()
    public
                    setPrivacyListAttribute([array<string|int, mixed> $privacyList = [] ]) : mixed
    Parameters
- $privacyList : array<string|int, mixed> = []
 
shares()
    public
                    shares() : MorphMany
    Return values
MorphManysyncHasManyRelationAttribute()
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
boolsyncHasOneRelationAttribute()
    public
                    syncHasOneRelationAttribute(HasOne $relation, array<string|int, mixed> $params) : bool
    Parameters
- $relation : HasOne
 - $params : array<string|int, mixed>
 
Return values
boolsyncPrivacyStreams()
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|nulltoFeedOGImages()
    public
                    toFeedOGImages() : array<int, mixed>
    Return values
array<int, mixed>toLink()
    public
                    toLink() : string|null
    Return values
string|nulltoOGDescription()
    public
                    toOGDescription([User|null $context = null ]) : string|null
    Parameters
- $context : User|null = null
 
Return values
string|nulltoRouter()
    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>toSearchable()
    public
                    toSearchable() : array<string, mixed>|null
    Return values
array<string, mixed>|nulltoSitemapUrl()
    public
                    toSitemapUrl() : string|null
    Return values
string|nulltoSponsorData()
    public
                    toSponsorData() : array<string|int, mixed>|null
    Return values
array<string|int, mixed>|nulltoTitle()
    public
                    toTitle() : string
    Return values
stringtoUrl()
    public
                    toUrl() : string|null
    Return values
string|nullungroupedItems()
    public
                    ungroupedItems() : HasMany
    Return values
HasManyuser()
    public
                    user() : MorphTo
    Return values
MorphTouserEntity()
    public
                    userEntity() : BelongsTo
    Return values
BelongsTouserId()
    public
                    userId() : int
    Return values
intuserType()
    public
                    userType() : string
    Return values
stringallowDestroyNestedAttributes()
Check can we delete nested data.
    protected
                    allowDestroyNestedAttributes(array<string|int, mixed> $params) : bool
    Parameters
- $params : array<string|int, mixed>
 
Return values
boolisDefault()
    protected
                    isDefault() : Attribute
    Return values
AttributeisNormal()
    protected
                    isNormal() : Attribute
    Return values
AttributeisTimeline()
    protected
                    isTimeline() : Attribute
    Return values
AttributenewFactory()
    protected
            static        newFactory() : AlbumFactory