MetaFox

PhotoRepositoryInterface extends HasSponsor, HasFeature, HasSponsorInFeed
in

Interface PhotoRepositoryInterface.

Tags
mixin

BaseRepository

mixin

CollectTotalItemStatTrait

Table of Contents

Methods

approve()  : Content
cleanUpRelationData()  : void
createPhoto()  : array<string|int, int>
deletePhoto()  : array<string, mixed>
deleteTaggedFriend()  : false|int
disableSponsor()  : void
downloadPhoto()  : Photo
enableSponsor()  : void
feature()  : bool
findFeature()  : Paginator
findSponsor()  : Paginator
getAlbum()  : Album
getPhotoByFeedId()  : Paginator
getPhotosByGroupId()  : Collection|null
getPrivacyFromAlbum()  : array<string, mixed>
getRandomSponsoredItems()  : Collection
getSponsoredItem()  : Content
getTaggedFriends()  : Collection
isFeature()  : bool
isFeedSponsored()  : bool
isPending()  : bool
isSponsor()  : bool
makeParentAvatar()  : array<string, mixed>|null
makeParentCover()  : bool
makeProfileAvatar()  : array<string, mixed>|null
makeProfileCover()  : bool
sponsor()  : bool
sponsorInFeed()  : bool
tagFriend()  : TagFriendModel
tempFileToExistPhoto()  : Photo
tempFileToPhoto()  : Photo
unsponsor()  : bool
unsponsorInFeed()  : bool
updateAvatarPath()  : string
updatePhoto()  : Photo
uploadMedias()  : PhotoGroup
viewPhoto()  : Photo
viewPhotos()  : Paginator
viewPhotoSet()  : PhotoGroup

Methods

createPhoto()

public createPhoto(User $context, User $owner, array<string, mixed> $attributes[, int $albumType = Album::TIMELINE_ALBUM ][, string|null $typeId = null ]) : array<string|int, int>
Parameters
$context : User
$owner : User
$attributes : array<string, mixed>
$albumType : int = Album::TIMELINE_ALBUM
$typeId : string|null = null
Tags
throws
AuthorizationException
throws
Exception
Return values
array<string|int, int>

deletePhoto()

public deletePhoto(User $context, int $id) : array<string, mixed>
Parameters
$context : User
$id : int
Tags
throws
AuthorizationException
Return values
array<string, mixed>

deleteTaggedFriend()

public deleteTaggedFriend(User $user, int $tagId) : false|int
Parameters
$user : User
$tagId : int
Tags
throws
AuthorizationException
Return values
false|int

feature()

public feature(User $context, int $id, int $feature) : bool
Parameters
$context : User
$id : int
$feature : int
Tags
throws
AuthorizationException
Return values
bool

findFeature()

public findFeature([int $limit = 4 ]) : Paginator
Parameters
$limit : int = 4
Return values
Paginator

findSponsor()

public findSponsor([int $limit = 4 ]) : Paginator
Parameters
$limit : int = 4
Return values
Paginator

getPhotoByFeedId()

public getPhotoByFeedId(User $context, int $feedId[, array<string, mixed> $attributes = [] ]) : Paginator
Parameters
$context : User
$feedId : int
$attributes : array<string, mixed> = []
Tags
throws
AuthorizationException
Return values
Paginator

getPhotosByGroupId()

public getPhotosByGroupId(int $groupId) : Collection|null
Parameters
$groupId : int
Return values
Collection|null

getPrivacyFromAlbum()

public getPrivacyFromAlbum(int $albumId, array<string, mixed> $attributes) : array<string, mixed>
Parameters
$albumId : int
$attributes : array<string, mixed>
Return values
array<string, mixed>

getRandomSponsoredItems()

public getRandomSponsoredItems(User $context, int $limit[, array<string|int, mixed>|null $loadedItemIds = null ]) : Collection
Parameters
$context : User
$limit : int
$loadedItemIds : array<string|int, mixed>|null = null
Return values
Collection

getSponsoredItem()

public getSponsoredItem(array<string|int, int> $notInIds[, int|null $sponsorStart = null ][, array<string|int, mixed> $with = [] ]) : Content
Parameters
$notInIds : array<string|int, int>
$sponsorStart : int|null = null
$with : array<string|int, mixed> = []
Return values
Content

| null

getTaggedFriends()

public getTaggedFriends(User $context, int $photoId) : Collection
Parameters
$context : User
$photoId : int
Tags
throws
AuthorizationException
Return values
Collection

makeParentAvatar()

public makeParentAvatar(User $context, int $id[, User|null $owner = null ][, string|null $imageCrop = null ]) : array<string, mixed>|null
Parameters
$context : User
$id : int
$owner : User|null = null
$imageCrop : string|null = null
Return values
array<string, mixed>|null

makeParentCover()

public makeParentCover(User $context, int $id) : bool
Parameters
$context : User
$id : int
Tags
throws
AuthorizationException
throws
ValidationException
Return values
bool

makeProfileAvatar()

public makeProfileAvatar(User $context, int $id[, string|null $imageCrop = null ]) : array<string, mixed>|null
Parameters
$context : User
$id : int
$imageCrop : string|null = null
Tags
throws
AuthorizationException
throws
ValidationException
Return values
array<string, mixed>|null

makeProfileCover()

public makeProfileCover(User $context, int $id[, array<string, mixed> $attributes = [] ]) : bool
Parameters
$context : User
$id : int
$attributes : array<string, mixed> = []
Tags
throws
AuthorizationException
throws
ValidationException
Return values
bool

sponsor()

public sponsor(User $context, int $id, int $sponsor) : bool
Parameters
$context : User
$id : int
$sponsor : int
Tags
throws
AuthorizationException
Return values
bool

sponsorInFeed()

public sponsorInFeed(User $context, int $id, int $newValue) : bool
Parameters
$context : User
$id : int
$newValue : int
Tags
throws
AuthorizationException
Return values
bool

unsponsor()

public unsponsor(User $context, int $id) : bool
Parameters
$context : User
$id : int
Return values
bool

unsponsorInFeed()

public unsponsorInFeed(User $context, int $id) : bool
Parameters
$context : User
$id : int
Return values
bool

updateAvatarPath()

public updateAvatarPath(int $photoId, string $path[, array<string|int, int> $sizes = [] ][, array<string|int, int> $squareSizes = [] ]) : string
Parameters
$photoId : int
$path : string
$sizes : array<string|int, int> = []
$squareSizes : array<string|int, int> = []
Return values
string

updatePhoto()

public updatePhoto(User $context, int $id, array<string, mixed> $attributes) : Photo
Parameters
$context : User
$id : int
$attributes : array<string, mixed>
Tags
throws
Exception
throws
AuthorizationException
Return values
Photo

viewPhotos()

public viewPhotos(User $context, User $owner[, array<string, mixed> $attributes = [] ]) : Paginator
Parameters
$context : User
$owner : User
$attributes : array<string, mixed> = []
Tags
throws
AuthorizationException
Return values
Paginator

        
On this page

Search results