public function getAssignments($userId) {
		if(empty($userId)) {
			return [];
		}
		$roles = $this->allRoleNamesByUserId($userId);
		return AssignmentHelper::forge($userId, $roles);
	}
public function getAssignments($userId) {
		if(empty($userId)) {
			return [];
		}
		$roles = $this->allRoleNamesByUserId($userId);
		return AssignmentHelper::forge($userId, $roles);
	}
public function getAssignments ( $ userId ) { if ( empty ( $ userId ) ) { return [ ] ; } $ roles = $ this -> allRoleNamesByUserId ( $ userId ) ; return AssignmentHelper :: forge ( $ userId , $ roles ) ; }
Returns all role assignment information for the specified user.

@param string|int $userId the user ID (see [[\yii\web\User::id]])

@return Assignment[] the assignments indexed by role names. An empty array will be
returned if there is no role assigned to the user.
Returns all role assignment information for the specified user .