コード例 #1
0
 public function registerRole($itemType, MembershipRole $role)
 {
     if (!isset($this->roles[$itemType])) {
         $this->roles[$itemType] = array();
     }
     $this->roles[$itemType][$role->getId()] = $role;
 }
コード例 #2
0
ファイル: Area.php プロジェクト: zyxist/cantiga
 public function editMember(Connection $conn, User $user, MembershipRole $role, $note)
 {
     return 1 == $conn->update(CoreTables::AREA_MEMBER_TBL, ['role' => (int) $role->getId(), 'note' => $note], ['areaId' => $this->getId(), 'userId' => $user->getId()]);
 }