Toggle navigation
Hot Examples
ZH
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
搜索
Home
yii
rbac
ManagerInterface
getAssignment
yii\rbac\ManagerInterface::getAssignment PHP Method
ManagerInterface Interface Documentation
显示文件
Open project: yiisoft/yii2
getAssignment()
public
method
Returns the assignment information regarding a role and a user.
public
getAssignment
(
string
$roleName
,
string
|
integer
$userId
) :
null
|
Assignment
$roleName
string
the role name
$userId
string
|
integer
the user ID (see [[\yii\web\User::id]])
return
null
|
Assignment
the assignment information. Null is returned if the role is not assigned to the user.
public function getAssignment($roleName, $userId);
ManagerInterface
add
addChild
assign
canAddChild
createPermission
createRole
getAssignment
getAssignments
getChildRoles
getChildren
getPermission
getPermissions
getPermissionsByRole
getPermissionsByUser
getRole
getRoles
getRolesByUser
getRule
getRules
getUserIdsByRole
hasChild
remove
removeAll
removeAllAssignments
removeAllPermissions
removeAllRoles
removeAllRules
removeChild
removeChildren
revoke
revokeAll
update