PhotoItem
extends JsonResource
in package
Uses
PhotoHasExtra, HasStatistic, IsLikedTrait, IsFriendTrait
Class PhotoItem.
Table of Contents
Properties
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
$resource
public
Photo
$resource
Methods
canAddFriend()
public
canAddFriend(User $context[, User|null $user = null ]) : bool
Parameters
Return values
boolcountTotalFriend()
public
countTotalFriend(int $userId) : int
Parameters
- $userId : int
Return values
intcountTotalFriendRequest()
public
countTotalFriendRequest(User $user) : int
Parameters
- $user : User
Return values
intcountTotalMutualFriend()
public
countTotalMutualFriend(int $contextId, int $userId) : int
Parameters
- $contextId : int
- $userId : int
Return values
intgetStatistic()
public
getStatistic() : array<string, mixed>
Return values
array<string, mixed>getTaggedFriend()
public
getTaggedFriend(Entity|null $item, User $friend) : mixed
Parameters
getTaggedFriendItems()
public
getTaggedFriendItems(HasTaggedFriend $item[, int $limit = 10 ]) : array<string|int, mixed>
Parameters
- $item : HasTaggedFriend
- $limit : int = 10
Tags
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|nullisFriend()
public
isFriend(User $context[, User|null $user = null ]) : bool
Parameters
Return values
boolisLike()
public
isLike(User $context[, Entity|null $content = null ]) : bool
Parameters
Return values
booltoArray()
Transform the resource collection into an array.
public
toArray(Request $request) : array<string, mixed>
Parameters
- $request : Request
Tags
Return values
array<string, mixed>getCustomExtra()
protected
getCustomExtra() : array<string, bool>