UserExtraPermissionListener
Uses
IsFriendTrait
Table of Contents
Methods
-
canAddFriend()
: bool
-
countTotalFriend()
: int
-
countTotalFriendRequest()
: int
-
countTotalMutualFriend()
: int
-
getTaggedFriend()
: mixed
-
getTaggedFriendItems()
: array<string|int, mixed>
-
getTaggedFriends()
: Builder|null
-
handle()
: array<string|int, mixed>
-
isFriend()
: bool
canAddFriend()
public
canAddFriend(User $context[, User|null $user = null ]) : bool
Parameters
-
$context
: User
-
-
$user
: User|null
= null
-
countTotalFriend()
public
countTotalFriend(int $userId) : int
Parameters
-
$userId
: int
-
countTotalFriendRequest()
public
countTotalFriendRequest(User $user) : int
Parameters
-
$user
: User
-
countTotalMutualFriend()
public
countTotalMutualFriend(int $contextId, int $userId) : int
Parameters
-
$contextId
: int
-
-
$userId
: int
-
getTaggedFriend()
public
getTaggedFriend(Entity|null $item, User $friend) : mixed
Parameters
-
$item
: Entity|null
-
-
$friend
: User
-
getTaggedFriendItems()
public
getTaggedFriendItems(HasTaggedFriend $item[, int $limit = 10 ]) : array<string|int, mixed>
Parameters
-
$item
: HasTaggedFriend
-
-
$limit
: int
= 10
-
-
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
handle()
public
handle(User $context, User|null $user) : array<string|int, mixed>
Parameters
-
$context
: User
-
-
$user
: User|null
-
Return values
array<string|int, mixed>
isFriend()
public
isFriend(User $context[, User|null $user = null ]) : bool
Parameters
-
$context
: User
-
-
$user
: User|null
= null
-