IsFriendTrait
Trait IsFriendTrait.
Table of Contents
Methods
- canAddFriend() : bool
- countTotalFriend() : int
- countTotalFriendRequest() : int
- countTotalMutualFriend() : int
- getTaggedFriend() : mixed
- getTaggedFriendItems() : array<string|int, mixed>
- getTaggedFriends() : Builder|null
- isFriend() : bool
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
intgetTaggedFriend()
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