RoleValidator
Table of Contents
Methods
-
__construct()
: mixed
-
accessOnRole()
: bool
-
accessOnRoles()
: array<string|int, mixed>
-
getRoleByCode()
: int
-
getRoleByCodesNotSystems()
: array<string|int, mixed>
-
getRoleIdNotSystemByCode()
: int
-
hasInFavoriteList()
: void
-
hasNotInFavoriteList()
: void
-
hasRoleIdInShare()
: array<string|int, mixed>
-
inAccessibleIgnoreDelete()
: void
__construct()
public
__construct(RoleService $roleService, ShareRepository $shareRepository, ShareService $shareService, OwnerService $ownerService, FavoriteService $favoriteService) : mixed
Parameters
-
$roleService
: RoleService
-
-
$shareRepository
: ShareRepository
-
-
$shareService
: ShareService
-
-
$ownerService
: OwnerService
-
-
$favoriteService
: FavoriteService
-
accessOnRole()
public
accessOnRole(int $roleId, string $fieldName, int $userId) : bool
Parameters
-
$roleId
: int
-
-
$fieldName
: string
-
-
$userId
: int
-
accessOnRoles()
public
accessOnRoles(array<string|int, mixed> $roleIds, string $fieldName, int $userId) : array<string|int, mixed>
Parameters
-
$roleIds
: array<string|int, mixed>
-
-
$fieldName
: string
-
-
$userId
: int
-
Return values
array<string|int, mixed>
getRoleByCode()
public
getRoleByCode(string $code, string $fieldName) : int
Parameters
-
$code
: string
-
-
$fieldName
: string
-
getRoleByCodesNotSystems()
public
getRoleByCodesNotSystems(array<string|int, mixed> $roleCodes, string $fieldName) : array<string|int, mixed>
Parameters
-
$roleCodes
: array<string|int, mixed>
-
-
$fieldName
: string
-
Return values
array<string|int, mixed>
getRoleIdNotSystemByCode()
public
getRoleIdNotSystemByCode(string $roleCode, string $fieldName) : int
Parameters
-
$roleCode
: string
-
-
$fieldName
: string
-
hasInFavoriteList()
public
hasInFavoriteList(string $roleCode, string $fieldName, int $userId) : void
Parameters
-
$roleCode
: string
-
-
$fieldName
: string
-
-
$userId
: int
-
-
throws
-
ValidateException
hasNotInFavoriteList()
public
hasNotInFavoriteList(string $roleCode, string $fieldName, int $userId) : void
Parameters
-
$roleCode
: string
-
-
$fieldName
: string
-
-
$userId
: int
-
-
throws
-
ValidateException
hasRoleIdInShare()
public
hasRoleIdInShare(int $roleId, string $fieldName) : array<string|int, mixed>
Parameters
-
$roleId
: int
-
-
$fieldName
: string
-
Return values
array<string|int, mixed>
inAccessibleIgnoreDelete()
public
inAccessibleIgnoreDelete(int $roleId, string $fieldName, int $userId) : void
Parameters
-
$roleId
: int
-
-
$fieldName
: string
-
-
$userId
: int
-
-
throws
-
ValidateException