UserBlockedSupport
in package
implements
UserBlockedSupportContract
Table of Contents
Interfaces
- UserBlockedSupportContract
- Interface UserBlockedSupportContract.
Properties
- $userRepository : UserRepositoryInterface
- $blocked : array<string, bool>
- $blockedList : array<int, array<string|int, int>>
Methods
- __construct() : mixed
- blockUser() : bool
- Block user.
- clearCache() : void
- Use for clearing cache of the user.
- getBlockedUserIds() : array<string|int, int>
- Get blocked user IDs of the user.
- getBlockedUsers() : array<int, int>
- Get blocked users of the user.
- getBlockedUsersCollection() : Collection
- Return a collection of the user entity.
- getBlockUserDetail() : UserEntity|null
- Get user blocked detail based on user_id and owner_id.
- getCacheName() : string
- isBlocked() : bool
- unBlockUser() : bool
- Unblock the user.
- processBlockUser() : void
- processUnBlockUser() : void
Properties
$userRepository
protected
UserRepositoryInterface
$userRepository
$blocked
private
array<string, bool>
$blocked
= []
$blockedList
private
array<int, array<string|int, int>>
$blockedList
= []
Methods
__construct()
public
__construct(UserRepositoryInterface $userRepository) : mixed
Parameters
- $userRepository : UserRepositoryInterface
blockUser()
Block user.
public
blockUser(User $user, User $owner) : bool
Parameters
Return values
boolclearCache()
Use for clearing cache of the user.
public
clearCache(int $userId) : void
Parameters
- $userId : int
getBlockedUserIds()
Get blocked user IDs of the user.
public
getBlockedUserIds(User $user) : array<string|int, int>
Stored user ids only.
Parameters
- $user : User
Return values
array<string|int, int>getBlockedUsers()
Get blocked users of the user.
public
getBlockedUsers(User $user[, string $search = null ]) : array<int, int>
Stored user ids only.
Parameters
- $user : User
- $search : string = null
Return values
array<int, int>getBlockedUsersCollection()
Return a collection of the user entity.
public
getBlockedUsersCollection(User $user, string|null $search) : Collection
Parameters
- $user : User
- $search : string|null
Return values
CollectiongetBlockUserDetail()
Get user blocked detail based on user_id and owner_id.
public
getBlockUserDetail(User $user, User $owner) : UserEntity|null
Return an instance user entity.
Parameters
Return values
UserEntity|nullgetCacheName()
public
getCacheName(int $userId) : string
Parameters
- $userId : int
Return values
stringisBlocked()
public
isBlocked(User|null $user, User|null $owner) : bool
Parameters
Return values
boolunBlockUser()
Unblock the user.
public
unBlockUser(User $user, User $owner) : bool
Parameters
Return values
boolprocessBlockUser()
private
processBlockUser(User $user, User $owner) : void
Parameters
processUnBlockUser()
private
processUnBlockUser(User $user, User $owner) : void