RoleRepository
extends BaseRepository
Table of Contents
Constants
-
FLAG_IS_ACTIVE
= 1
-
FLAG_IS_NOT_SYSTEM
= 'N'
-
FLAG_IS_SYSTEM
= 'Y'
-
SYSTEM_USER_ID
= 0
Methods
-
__construct()
: mixed
-
changeActivateRole()
: UpdateResult
-
changeActivateRoles()
: UpdateResult
-
getAvatarByRoleId()
: array<string|int, mixed>|bool
-
getByCode()
: array<string|int, mixed>|bool
-
getByIdForUpdate()
: array<string|int, mixed>|bool
-
getByRoleCodes()
: array<string|int, mixed>
-
getRoleIdInAccessibleList()
: array<string|int, mixed>|bool
FLAG_IS_ACTIVE
public
mixed
FLAG_IS_ACTIVE
= 1
FLAG_IS_NOT_SYSTEM
public
mixed
FLAG_IS_NOT_SYSTEM
= 'N'
FLAG_IS_SYSTEM
public
mixed
FLAG_IS_SYSTEM
= 'Y'
SYSTEM_USER_ID
public
mixed
SYSTEM_USER_ID
= 0
__construct()
public
__construct(UserAccessRepository $userAccessRepository) : mixed
Parameters
-
$userAccessRepository
: UserAccessRepository
-
changeActivateRole()
public
changeActivateRole(int $roleId, bool $needActivate, mixed $userId) : UpdateResult
Parameters
-
$roleId
: int
-
-
$needActivate
: bool
-
-
$userId
: mixed
-
-
throws
-
Exception
changeActivateRoles()
public
changeActivateRoles(array<string|int, mixed> $roleIds, bool $needActivate, int $userId) : UpdateResult
Parameters
-
$roleIds
: array<string|int, mixed>
-
-
$needActivate
: bool
-
-
$userId
: int
-
getAvatarByRoleId()
public
getAvatarByRoleId(int $roleId) : array<string|int, mixed>|bool
Parameters
-
$roleId
: int
-
Return values
array<string|int, mixed>|bool
getByCode()
public
getByCode(string $code) : array<string|int, mixed>|bool
Parameters
-
$code
: string
-
Return values
array<string|int, mixed>|bool
getByIdForUpdate()
public
getByIdForUpdate(int $roleId) : array<string|int, mixed>|bool
Parameters
-
$roleId
: int
-
Return values
array<string|int, mixed>|bool
getByRoleCodes()
public
getByRoleCodes(array<string|int, mixed> $roleCodes) : array<string|int, mixed>
Parameters
-
$roleCodes
: array<string|int, mixed>
-
Return values
array<string|int, mixed>
getRoleIdInAccessibleList()
public
getRoleIdInAccessibleList(int $userId, int $roleId[, bool|null $checkInFavorite = null ][, bool|null $checkInDelete = null ]) : array<string|int, mixed>|bool
Parameters
-
$userId
: int
-
-
$roleId
: int
-
-
$checkInFavorite
: bool|null
= null
-
-
$checkInDelete
: bool|null
= null
-
Return values
array<string|int, mixed>|bool