public function registerRole($itemType, MembershipRole $role) { if (!isset($this->roles[$itemType])) { $this->roles[$itemType] = array(); } $this->roles[$itemType][$role->getId()] = $role; }
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()]); }