MetaFox

PhotoItem extends JsonResource
in package
Uses PhotoHasExtra, HasStatistic, IsLikedTrait, IsFriendTrait

Class PhotoItem.

Table of Contents

Properties

$resource  : Photo

Methods

canAddFriend()  : bool
countTotalFriend()  : int
countTotalFriendRequest()  : int
countTotalMutualFriend()  : int
getStatistic()  : array<string, mixed>
getTaggedFriend()  : mixed
getTaggedFriendItems()  : array<string|int, mixed>
getTaggedFriends()  : Builder|null
isFriend()  : bool
isLike()  : bool
toArray()  : array<string, mixed>
Transform the resource collection into an array.
getCustomExtra()  : array<string, bool>

Properties

Methods

canAddFriend()

public canAddFriend(User $context[, User|null $user = null ]) : bool
Parameters
$context : User
$user : User|null = null
Return values
bool

countTotalFriend()

public countTotalFriend(int $userId) : int
Parameters
$userId : int
Return values
int

countTotalFriendRequest()

public countTotalFriendRequest(User $user) : int
Parameters
$user : User
Return values
int

countTotalMutualFriend()

public countTotalMutualFriend(int $contextId, int $userId) : int
Parameters
$contextId : int
$userId : int
Return values
int

getStatistic()

public getStatistic() : array<string, mixed>
Return values
array<string, mixed>

getTaggedFriendItems()

public getTaggedFriendItems(HasTaggedFriend $item[, int $limit = 10 ]) : array<string|int, mixed>
Parameters
$item : HasTaggedFriend
$limit : int = 10
Tags
throws
AuthorizationException
Return values
array<string|int, mixed>

getTaggedFriends()

public getTaggedFriends(Entity|null $item[, int $limit = 10 ][, array<string|int, mixed> $excludedIds = [] ]) : Builder|null
Parameters
$item : Entity|null
$limit : int = 10
$excludedIds : array<string|int, mixed> = []
Return values
Builder|null

isFriend()

public isFriend(User $context[, User|null $user = null ]) : bool
Parameters
$context : User
$user : User|null = null
Return values
bool

toArray()

Transform the resource collection into an array.

public toArray(Request $request) : array<string, mixed>
Parameters
$request : Request
Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

throws
AuthenticationException
Return values
array<string, mixed>

getCustomExtra()

protected getCustomExtra() : array<string, bool>
Tags
throws
AuthenticationException
Return values
array<string, bool>

        
On this page

Search results