public function addAccountTypePermissionRecord($id, $name, $createUserPerm, $editUserPerm, $deleteUserPerm, $createMapPerm, $editMapPerm, $deleteMapPerm)
 {
     $AccountTypePermission = new AccountTypePermission();
     //$AccountTypePermission->id = $id;
     $AccountTypePermission->name = $name;
     $AccountTypePermission->create_user = $createUserPerm;
     $AccountTypePermission->edit_user = $editUserPerm;
     $AccountTypePermission->delete_user = $deleteUserPerm;
     $AccountTypePermission->create_map = $createMapPerm;
     $AccountTypePermission->edit_map = $editMapPerm;
     $AccountTypePermission->delete_map = $deleteMapPerm;
     $AccountTypePermission->save();
 }
 /**
  * @return string the type text display for the current account
  */
 public function getTypeText()
 {
     $accountTypeRecord = AccountTypePermission::model()->findByAttributes(array('id' => $this->type_id));
     return $accountTypeRecord->name;
 }