MetaFox

Friend
in package
implements FriendContract

Class Friend.

Table of Contents

Interfaces

FriendContract

Constants

FRIENDSHIP_CAN_ADD_FRIEND  = 0
FRIENDSHIP_CAN_NOT_ADD_FRIEND  = 4
FRIENDSHIP_CONFIRM_AWAIT  = 2
FRIENDSHIP_IS_DENY_REQUEST  = 7
FRIENDSHIP_IS_FRIEND  = 1
FRIENDSHIP_IS_OWNER  = 5
FRIENDSHIP_IS_UNKNOWN  = 6
FRIENDSHIP_REQUEST_SENT  = 3
SHARED_TYPE  = 'friend'

Properties

$friendRepository  : FriendRepositoryInterface
$requestRepository  : FriendRequestRepositoryInterface
$userRepository  : UserRepositoryInterface

Methods

__construct()  : mixed
getFriendIds()  : array<string|int, int>
getFriendship()  : int
getUsersForMention()  : Collection
isFriend()  : bool

Constants

FRIENDSHIP_CAN_ADD_FRIEND

public mixed FRIENDSHIP_CAN_ADD_FRIEND = 0

FRIENDSHIP_CAN_NOT_ADD_FRIEND

public mixed FRIENDSHIP_CAN_NOT_ADD_FRIEND = 4

FRIENDSHIP_CONFIRM_AWAIT

public mixed FRIENDSHIP_CONFIRM_AWAIT = 2

FRIENDSHIP_IS_DENY_REQUEST

public mixed FRIENDSHIP_IS_DENY_REQUEST = 7

FRIENDSHIP_IS_FRIEND

public mixed FRIENDSHIP_IS_FRIEND = 1

FRIENDSHIP_IS_OWNER

public mixed FRIENDSHIP_IS_OWNER = 5

FRIENDSHIP_IS_UNKNOWN

public mixed FRIENDSHIP_IS_UNKNOWN = 6

FRIENDSHIP_REQUEST_SENT

public mixed FRIENDSHIP_REQUEST_SENT = 3

SHARED_TYPE

public mixed SHARED_TYPE = 'friend'

Properties

Methods

getFriendIds()

public getFriendIds(int $userId) : array<string|int, int>
Parameters
$userId : int
Return values
array<string|int, int>

getFriendship()

public getFriendship(User $context, User $user) : int
Parameters
$context : User
$user : User
Return values
int

getUsersForMention()

public getUsersForMention(array<string|int, mixed> $ids) : Collection
Parameters
$ids : array<string|int, mixed>
Return values
Collection

isFriend()

public isFriend(User $user, User $owner) : bool
Parameters
$user : User
$owner : User
Return values
bool

        
On this page

Search results