protected function btnSave_Click($strFormId, $strControlId, $strParameter) { // Make sure the new HeadOfHousehold is ONLY a member of this one household $objNewHeadPerson = Person::Load($this->lstHead->SelectedValue); switch ($objNewHeadPerson->GetHouseholdStatus()) { case Person::HouseholdStatusMemberOfOne: // Good! Do nothing and move on break; case Person::HouseholdStatusMemberOfMultiple: $this->dlgMessage->MessageHtml = sprintf('%s is a member of another household and thus cannot be head of this new household.', QApplication::HtmlEntities($objNewHeadPerson->Name)); $this->dlgMessage->ShowDialogBox(); return; case Person::HouseholdStatusNone: case Person::HouseholdStatusHeadOfOne: case Person::HouseholdStatusHeadOfFamily: case Person::HouseholdStatusError: default: $this->dlgMessage->MessageHtml = sprintf('An unknown data error occurred while trying to split <strong>%s</strong>. Please contact a ChMS Administrator to report the issue.', QApplication::HtmlEntities($this->objHousehold->Name)); $this->dlgMessage->ShowDialogBox(); return; } if (!$this->pnlAddress->objDelegate->btnSave_Click()) { return; } $objNewAddress = $this->pnlAddress->objDelegate->mctAddress->Address; $objNewHousehold = $this->objHousehold->SplitHousehold($this->objSelectedPersonArray, $objNewHeadPerson, $objNewAddress); QApplication::Redirect('/households/view.php/' . $objNewHousehold->Id); }
protected function btnSave_Click($strFormId, $strControlId, $strParameter) { if (!$this->objSelectedHousehold) { QApplication::DisplayAlert('Please Select a Household'); return; } $this->objHousehold->MergeHousehold($this->objSelectedHousehold, Person::Load($this->lstHead->SelectedValue)); $this->RedirectToViewPage(); }
protected function Form_Create() { // Setup Household Object $this->objHousehold = Household::Load(QApplication::PathInfo(0)); if (!$this->objHousehold) { QApplication::Redirect('/households/'); } $this->strPageTitle .= 'Home Address - ' . $this->objHousehold->Name; $this->pnlContent = new EditHouseholdHomeAddressPanel($this); $this->pnlContent->objDelegate = new EditHomeAddressDelegate($this->pnlContent, '/households/view.php/' . $this->objHousehold->Id, QApplication::PathInfo(1)); $this->pnlContent->btnSave->AddAction(new QClickEvent(), new QShowDialogBox($this->pnlContent->objDelegate->dlgMessage)); $this->pnlContent->btnSave->AddAction(new QClickEvent(), new QAjaxControlAction($this->pnlContent, 'btnSave_Click')); $this->strPageTitle = ($this->pnlContent->objDelegate->mctAddress->EditMode ? 'Edit' : 'Create New') . ' ' . $this->strPageTitle; }
protected function btnSave_Click() { $this->pnlContent->objDelegate->mctAddress->UpdateFields(); if ($this->pnlContent->objDelegate->mctAddress->Address->ValidateUsps()) { // Create the household $this->objHousehold = Household::CreateHousehold($this->objPerson); // Delete any old home phone number records foreach ($this->objPerson->GetPhoneArray() as $objPhone) { if ($objPhone->PhoneTypeId == PhoneType::Home) { $objPhone->Delete(); } } } // Save the address $this->pnlContent->btnSave_Click(); }
protected function Form_Create() { $this->objHousehold = Household::Load(QApplication::PathInfo(1)); if ($this->objHousehold) { if (!HouseholdParticipation::LoadByPersonIdHouseholdId($this->objPerson->Id, $this->objHousehold->Id)) { QApplication::Redirect('/individuals/'); } } else { $objHouseholdParticipationArray = HouseholdParticipation::LoadArrayByPersonId($this->objPerson->Id); if ($objHouseholdParticipationArray) { $this->objHousehold = $objHouseholdParticipationArray[0]->Household; } } $this->strPageTitle .= $this->objPerson->Name; // Unset based on Permissions if (!QApplication::$Login->IsPermissionAllowed(PermissionType::AccessStewardship)) { unset($this->strSubNavItemArray['stewardship']); } if (!QApplication::$Login->IsPermissionAllowed(PermissionType::MergeIndividuals)) { unset($this->strSubNavItemArray['merge']); } // Alter Inactive/Active based on whether or not the person has a login if ($this->objPerson->PublicLogin) { $this->strSubNavItemArray['online'][2] = null; } $this->lblHeading = new QLabel($this); $this->lblSubheading = new QLabel($this); $this->lblSubheading->CssClass = 'subhead'; $this->lblSubheading->HtmlEntities = false; $this->lstHouseholdSwitcher = new QListBox($this); $this->lstHouseholdSwitcher->SetCustomStyle('float', 'right'); $this->lstHouseholdSwitcher->SetCustomStyle('margin-top', '8px;'); $this->lstHouseholdSwitcher->Visible = false; $this->lstHouseholdSwitcher->AddAction(new QChangeEvent(), new QAjaxAction('lstHouseholdSwitcher_Change')); $this->pnlHouseholdSelector = new HouseholdSelectorPanel($this); $this->pnlSubnavBar = new ViewIndividualSubNavPanel($this); $this->pnlMainContent = new QPanel($this); $this->pnlMainContent->AutoRenderChildren = true; $this->pnlMainContent->CssClass = 'subnavContent'; $this->SetUrlHashProcessor('Form_ProcessHash'); $this->lblHeading_Refresh(); $this->lstHouseholdSwitcher_Refresh(); }
public function btnSave_Click() { $objParticipants = $this->objHousehold->GetOrderedParticipantArray(); // Set the new Head foreach ($objParticipants as $objParticipant) { $radHead = $this->GetControl('radHead' . $objParticipant->Id); if ($radHead->Checked) { $this->objHousehold->SetAsHeadPerson($objParticipant->Person); } } // Update the Roles foreach ($objParticipants as $objParticipant) { $radHead = $this->GetControl('radHead' . $objParticipant->Id); $txtRole = $this->GetControl('txtRole' . $objParticipant->Id); if (!$radHead->Checked) { $objParticipant->RoleOverride = trim($txtRole->Text); } else { $objParticipant->RoleOverride = null; } $objParticipant->RefreshRole(); } QApplication::Redirect('/households/view.php/' . $this->objHousehold->Id); }
/** * Generates a typical Single-Family household * @return Household */ public static function GenerateHouseholdSingleFamily() { $strLastName = QDataGen::GenerateLastName(); $objHeadPerson = self::GenerateIndividual(rand(0, 6), true, $strLastName); $objHousehold = Household::CreateHousehold($objHeadPerson); $objHousehold->CombinedStewardshipFlag = rand(0, 7); $objHousehold->Save(); // Add a Spouse if (rand(0, 6)) { $objSpouse = self::GenerateIndividual($objHeadPerson->Gender == 'M' ? false : true, true, $strLastName); $intMinimumChildCount = 0; $objHeadPerson->DeleteAllMarriages(); $objSpouse->DeleteAllMarriages(); if ($objHeadPerson->DateOfBirth) { $dttStartDate = $objHeadPerson->DateOfBirth; } else { if ($objSpouse->DateOfBirth) { $dttStartDate = $objSpouse->DateOfBirth; } else { $dttStartDate = QDataGen::GenerateDateTime(self::$LifeStartDate, QDateTime::Now()); } } $dttStartDate = QDataGen::GenerateDateTime($dttStartDate, QDateTime::Now()); $objHeadPerson->CreateMarriageWith($objSpouse, $dttStartDate); $objHousehold->AssociatePerson($objSpouse); } else { // If no spouse, we must have at least one child in order to be a "family" $objSpouse = null; $intMinimumChildCount = 1; } // Add Children (if applicable) $intChildCount = rand($intMinimumChildCount, 4); $objChildArray = array(); for ($i = 0; $i < $intChildCount; $i++) { $objChild = self::GenerateIndividual(rand(0, 1), false, $strLastName); // Add the relationship $objHeadPerson->AddRelationship($objChild, RelationshipType::Child); if ($objSpouse) { $objSpouse->AddRelationship($objChild, RelationshipType::Child); } foreach ($objChildArray as $objSibling) { $objChild->AddRelationship($objSibling, RelationshipType::Sibling); } $objHousehold->AssociatePerson($objChild); $objChildArray[] = $objChild; } return $objHousehold; }
protected function AddToHousehold() { $this->objHousehold->AssociatePerson($this->objPersonToAdd, trim($this->txtRole->Text)); $this->RedirectToViewPage(); }
public function dtgMembers_Bind() { $this->dtgMembers->DataSource = $this->objHousehold->GetOrderedParticipantArray(); }
public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects) { if ($objObject->objPerson) { $objObject->objPerson = Person::GetSoapObjectFromObject($objObject->objPerson, false); } else { if (!$blnBindRelatedObjects) { $objObject->intPersonId = null; } } if ($objObject->objHousehold) { $objObject->objHousehold = Household::GetSoapObjectFromObject($objObject->objHousehold, false); } else { if (!$blnBindRelatedObjects) { $objObject->intHouseholdId = null; } } if ($objObject->objPrimaryPhone) { $objObject->objPrimaryPhone = Phone::GetSoapObjectFromObject($objObject->objPrimaryPhone, false); } else { if (!$blnBindRelatedObjects) { $objObject->intPrimaryPhoneId = null; } } if ($objObject->dttDateUntilWhen) { $objObject->dttDateUntilWhen = $objObject->dttDateUntilWhen->__toString(QDateTime::FormatSoap); } return $objObject; }
/** * Given a home (and optional mailing) address validator (which is unlinked from any db entry), go ahead and make updates * to this person record accordingly. * * If this person is part of multiple households, it will throw an error. * * If this person is part of one household, it will update the information for the household. * * If this person is not part of any houseold, it will create one for him/her. * * @param AddressValidator $objHomeAddressValidator * @param AddressValidator $objMailingAddressValidator optional * @param string $strHomePhone optional */ public function UpdateAddressInformation(AddressValidator $objHomeAddressValidator, AddressValidator $objMailingAddressValidator = null, $strHomePhone = null) { $objHouseholdArray = array(); foreach ($this->GetHouseholdParticipationArray() as $objHouseholdParticipation) { $objHouseholdArray[] = $objHouseholdParticipation->Household; } // Figure Out Household Information if (count($objHouseholdArray) > 1) { throw new QCallerException('Cannot call UpdateAddressInformation on a person who is part of multiple households: ' . $this->intId); } if (count($objHouseholdArray)) { $objHousehold = $objHouseholdArray[0]; } else { $objHousehold = Household::CreateHousehold($this); } // Home Address $objHomeAddress = $objHousehold->GetCurrentAddress(); $objAddress = $objHomeAddressValidator->CreateAddressRecord(); // Are we using the existing Household CurrentAddress record? if ($objHomeAddress && $objHomeAddress->IsEqualTo($objAddress)) { // Yes -- so all we're handling is the phones $objHomePhoneArray = $objHomeAddress->GetPhoneArray(); // Are we setting a home phone? if ($strHomePhone) { // Try and find the phone within the array foreach ($objHomePhoneArray as $objPhone) { $blnFound = false; if ($objPhone->Number == $strHomePhone) { $objPhone->SetAsPrimary(null, $objHomeAddress); $blnFound = true; } } // If we didn't find an existing home phone, we will update the current primary (if applicable) // Or create a new one as primary if (!$blnFound) { if (count($objHomePhoneArray)) { $objHomePhoneArray[0]->Number = $strHomePhone; $objHomePhoneArray[0]->Save(); } else { $objPhone = new Phone(); $objPhone->Number = $strHomePhone; $objPhone->Address = $objHomeAddress; $objPhone->PhoneTypeId = PhoneType::Home; $objPhone->Save(); $objPhone->SetAsPrimary(null, $objHomeAddress); } } // Nope - we are deleting the home phone } else { foreach ($objHomePhoneArray as $objPhone) { $objPhone->Delete(); } } // Not an existing Household CurrentAddress record that matches -- so we are creating a new one } else { $objAddress->Household = $objHousehold; $objAddress->CurrentFlag = true; $objAddress->AddressTypeId = AddressType::Home; $objAddress->Save(); $objHousehold->SetAsCurrentAddress($objAddress); // Add the phone if applicable if ($strHomePhone) { $objPhone = new Phone(); $objPhone->Number = $strHomePhone; $objPhone->Address = $objAddress; $objPhone->PhoneTypeId = PhoneType::Home; $objPhone->Save(); $objPhone->SetAsPrimary(null, $objAddress); } } // Mailing Address? if ($objMailingAddressValidator) { $objAddress = $objMailingAddressValidator->CreateAddressRecord(); $blnFound = false; foreach ($this->GetAllAssociatedAddressArray($objHousehold) as $objExistingAddress) { if ($objExistingAddress->IsEqualTo($objAddress)) { $this->MailingAddress = $objExistingAddress; $this->RefreshPrimaryContactInfo(); $blnFound = true; } } if (!$blnFound) { $objAddress->AddressTypeId = AddressType::Other; $objAddress->Person = $this; $objAddress->CurrentFlag = true; $objAddress->Save(); $this->MailingAddress = $objAddress; $this->RefreshPrimaryContactInfo(); } } else { if ($this->MailingAddress) { $this->MailingAddress = null; $this->RefreshPrimaryContactInfo(); } } }
function reassignHousehold(Household $household, $oldurid, $newurid) { $oldUser = new User($oldurid); //add to new iwer first.. then remove from old. if ($newurid != -1) { //back to agency //insert data into new iwer $data = $this->exportTables(array('data', 'datarecords', 'states', 'times', 'remarks', 'contacts'), '', 'primkey = "' . $household->getPrimkey() . '"'); $this->addSQLToUser($data, $newurid); //insert data into new iwer (for respodnents) foreach ($household->getSelectedRespondentsWithFinFamR() as $respondent) { $data = $this->exportTables(array('data', 'datarecords', 'states', 'times', 'remarks', 'contacts'), '', 'primkey = "' . $respondent->getPrimkey() . '"'); $this->addSQLToUser($data, $newurid); } //get data for household and respondents and add to new urid $data = $this->exportTables(array('households'), '', 'primkey = "' . $household->getPrimkey() . '"'); $data .= "\n"; $data .= $this->exportTables(array('respondents'), '', 'hhid = "' . $household->getPrimkey() . '"'); $this->addSQLToUser($data, $newurid); } if ($oldUser->getUserType() == USER_INTERVIEWER) { //not if this isn't an interviewer //remove data from old interviewer $data = $this->removeFromTables(array('data', 'datarecords', 'states', 'times', 'remarks', 'contacts'), '', 'primkey = "' . $household->getPrimkey() . '"'); $this->addSQLToUser($data, $oldurid); //remove data from old interviewer (for respondents) foreach ($household->getSelectedRespondentsWithFinFamR() as $respondent) { $data = $this->exportTables(array('data', 'datarecords', 'states', 'times', 'remarks', 'contacts'), '', 'primkey = "' . $respondent->getPrimkey() . '"'); $this->addSQLToUser($data, $oldurid); } //now remove from oldurid $data = $this->removeFromTables(array('households'), '', 'primkey = "' . $household->getPrimkey() . '"'); $data .= "\n"; $data .= $this->removeFromTables(array('respondents'), '', 'hhid = "' . $household->getPrimkey() . '"'); $this->addSQLToUser($data, $oldurid); } }
public function testMergeHouseholds() { $objOldHead = $this->objMultiplePersonHousehold1->HeadPerson; $objHeadPerson = Person::CreatePerson('HeadOfOne', null, 'Person', true); $objMergeHousehold = Household::CreateHousehold($objHeadPerson); $this->objMultiplePersonHousehold1->MergeHousehold($objMergeHousehold, $objHeadPerson); $this->AssertNull(Household::Load($objMergeHousehold->Id), 'MergeHousehold did not delete merged household'); $this->AssertEquals($this->objMultiplePersonHousehold1->CountHouseholdParticipations(), 4, 'MergeHousehold Person Count incorrect'); $objOldHead = Person::Load($objOldHead->Id); $this->AssertEquals($objOldHead->GetHouseholdStatus(), Person::HouseholdStatusMemberOfOne, 'MergeHousehold OldHead Status incorrect'); $objHeadPerson = Person::Load($objHeadPerson->Id); $this->AssertEquals($objHeadPerson->GetHouseholdStatus(), Person::HouseholdStatusHeadOfFamily, 'MergeHousehold NewHead Status incorrect'); $this->objMultiplePersonHousehold1->SetAsHeadPerson($objOldHead); $this->objMultiplePersonHousehold1->UnassociatePerson($objHeadPerson); $this->AssertEquals($this->objMultiplePersonHousehold1->CountHouseholdParticipations(), 3, 'MergeHousehold Person Count incorrect'); $objHeadPerson->Delete(); }
protected function DeletePerson() { $this->objHousehold->UnassociatePerson($this->objPersonToRemove); $this->objPersonToRemove->Delete(); $this->RedirectToViewPage(); }
/** * Called back from PaymentPanel to perform final tasks after we know * the payment has been submitted successfully. */ public function PaymentPanel_Success(OnlineDonation $objPaymentObject) { $strEmailAddress = trim(strtolower($this->txtEmail->Text)); // If there is a "address in waiting" for this OnlineDonation // Then it was a newly-created Person object // Let's create the household for this person if ($objPaymentObject->Address) { $objPerson = $objPaymentObject->Person; $objHousehold = Household::CreateHousehold($objPerson); $objAddress = $objPaymentObject->Address; $objAddress->AddressTypeId = AddressType::Home; $objAddress->CurrentFlag = true; $objAddress->Household = $objHousehold; $objAddress->Save(); $objHousehold->SetAsCurrentAddress($objAddress); // Add Email Address if ($strEmailAddress) { $objEmail = new Email(); $objEmail->Address = $strEmailAddress; $objEmail->Person = $objPerson; $objEmail->Save(); $objEmail->SetAsPrimary(); } } if (QApplication::$PublicLogin) { $objPaymentObject->SendConfirmationEmail(); } else { if ($strEmailAddress) { $objPaymentObject->SendConfirmationEmail($strEmailAddress); $_SESSION['onlineDonationEmailAddress' . $objPaymentObject->Id] = $strEmailAddress; } else { $_SESSION['onlineDonationEmailAddress' . $objPaymentObject->Id] = null; unset($_SESSION['onlineDonationEmailAddress' . $objPaymentObject->Id]); } } QApplication::Redirect($objPaymentObject->ConfirmationUrl); }
$action = new Household(); $action->getAll((array) $request['info']); $query = new Request(); $households = $query->query($action->sql); if (count($households)) { $response = $households; } else { $response = array(); } break; case 'REMOVE': break; case 'EDIT': break; case 'ADD': $action = new Household(); $action->create((array) $request['info']); $insert = new Request(); $request['info']->hid = $insert->insert($action->sql); // Now that I have HID, I need to add current user to member list of hhold, and then return the HoseHold with member list. $ident = new Identity(); $query = new Request(); $name = $query->query($ident->getname($request['info']['id'])->sql); $response = (array) $request['info']; break; default: # code... break; } echo json_encode($response); });
return '"' . str_replace('"', '""', $strString) . '"'; } $objParameters = new QCliParameterProcessor('export-stewardship-roster', 'ALCF Export Stewardship Roster to CSV'); $objParameters->AddDefaultParameter('year', QCliParameterType::Integer, 'The year of giving data to use'); $objParameters->AddDefaultParameter('export_path', QCliParameterType::Path, 'The folder to export to'); $objParameters->Run(); $intYear = $objParameters->GetDefaultValue('year'); $strFolder = $objParameters->GetDefaultValue('export_path'); $fltMinimumAmount = 0; $objFile = fopen($strFolder . '/contributors.csv', 'w'); fwrite($objFile, 'Salutation,MailingName,CompanyFacilityEtc,Address1,Address2,City,State,ZipCode' . "\r\n"); $objConditions = QQ::All(); // $objConditions = QQ::AndCondition($objConditions,QQ::Equal(QQN::Household()->HeadPerson->CanMailFlag, true)); $objHouseholdCursor = Household::QueryCursor($objConditions, QQ::OrderBy(QQN::Household()->HeadPerson->LastName)); QDataGen::DisplayForEachTaskStart('Generating CSV Row(s) for Household', Household::CountAll()); while ($objHousehold = Household::InstantiateCursor($objHouseholdCursor)) { QDataGen::DisplayForEachTaskNext('Generating CSV Row(s) for Household'); // Generate for the whole household if ($objHousehold->CombinedStewardshipFlag) { if ($objAddress = $objHousehold->GetStewardshipAddress()) { $intPersonIdArray = StewardshipContribution::GetPersonIdArrayForPersonOrHousehold($objHousehold); $objContributionAmountArray = StewardshipContribution::GetContributionAmountArrayForPersonArray($intPersonIdArray, $intYear); $fltAmount = StewardshipContribution::GetContributionAmountTotalForContributionAmountArray($objContributionAmountArray, false); if ($fltAmount > $fltMinimumAmount) { $objSpouse = $objHousehold->SpousePerson; if ($objSpouse) { // Head person says do not mail, but spouse says mail // Or if Head person is deceased and spouse says mail if (!$objHousehold->HeadPerson->CanMailFlag && $objSpouse->CanMailFlag || $objHousehold->HeadPerson->DeceasedFlag && $objSpouse->CanMailFlag) { fwrite($objFile, EscapeCsv($objSpouse->FirstName) . ',' . EscapeCsv($objHousehold->StewardshipHouseholdName) . ',' . EscapeCsv($objAddress->Address3) . ',' . EscapeCsv($objAddress->Address1) . ',' . EscapeCsv($objAddress->Address2) . ',' . EscapeCsv($objAddress->City) . ',' . EscapeCsv($objAddress->State) . ',' . EscapeCsv($objAddress->ZipCode) . "\r\n"); } else {
<?php require dirname(__FILE__) . '/../../includes/prepend.inc.php'; QApplication::Authenticate(null, array(PermissionType::AccessStewardship)); // Setup Zend Framework load set_include_path(get_include_path() . ':' . __INCLUDES__); require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Pdf'); // Expected PathInfo to be PersonId/HouseholdId/Year // Note that HouseholdId is OPTIONAL -- if HouseholdId, then it is a combined statement for the entire household // Otherwise, if no HouseholdId (e.g. "0"), then it is just a individual statement $objPerson = Person::Load(QApplication::PathInfo(0)); $objObject = $objPerson; if (QApplication::PathInfo(1)) { $objHousehold = Household::Load(QApplication::PathInfo(1)); if (!$objHousehold) { QApplication::Redirect('/main/'); } if (!HouseholdParticipation::LoadByPersonIdHouseholdId($objPerson->Id, $objHousehold->Id)) { QApplication::Redirect('/main/'); } $objObject = $objHousehold; } if (!(QApplication::PathInfo(2) >= 1950 && QApplication::PathInfo(2) <= 2500)) { QApplication::Redirect('/main/'); } // Create the PDF Object $objPdf = new Zend_Pdf(); StewardshipContribution::GenerateReceiptInPdf($objPdf, $objObject, QApplication::PathInfo(2), true); // Get PDF document as a string $strData = $objPdf->render();
function showAssignSample() { $assignids = loadvar('assignid'); $selurid = loadvar('selurid'); if (sizeof($assignids) > 0 && $selurid > 0) { foreach ($assignids as $id) { //sysadmin mode: change on server 'only' $household = new Household($id); $household->setUrid($selurid); $household->saveChanges(); } $message = 'Households/respondents assigned.'; } else { $message = 'No households/respondents assigned. Please select some households and a supervisor to assign sample.'; } $display = new Display(); return $this->showSample($display->displayInfo($message)); }
/** * Creates all the controls for each "question" in the form. * Note: For any fields that are looked up from the user's profile (e.g. address, phone, etc.) -- a drop down is available for quick access. * However, if they select "other", we save the data and do NOT link it to any records! * (e.g. if an "other" phone is used, that data is not stored anywhere else) */ protected function CreateFormItemControls() { /** * @var Person */ $objPerson = $this->objSignupEntry->Person; if ($objPerson != null) { // First, set up for the Person Name label $lblPersonName = new QLabel($this, 'lblPersonName'); $lblPersonName->Name = 'Name'; $lblPersonName->Required = true; $lblPersonName->Text = $objPerson->Name; $lblPersonName->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $lblPersonName; } else { // else if not logged in, prompt for First and Last Name. Always. $txtFirstName = new QTextBox($this); $txtFirstName->Name = 'First Name'; $txtFirstName->Required = true; $txtFirstName->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $txtFirstName; $txtLastName = new QTextBox($this); $txtLastName->Name = 'Last Name'; $txtLastName->Required = true; $txtLastName->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $txtLastName; } // Go through all the other fields foreach ($this->objSignupForm->GetFormQuestionArray(QQ::OrderBy(QQN::FormQuestion()->OrderNumber)) as $objFormQuestion) { // Only display if this is NOT "InternalFlag" if ($objFormQuestion->InternalFlag) { continue; } $strControlId = 'fq' . $objFormQuestion->Id; $objFormAnswer = FormAnswer::LoadBySignupEntryIdFormQuestionId($this->objSignupEntry->Id, $objFormQuestion->Id); switch ($objFormQuestion->FormQuestionTypeId) { case FormQuestionType::SpouseName: if ($objPerson != null) { if (($objMarriage = $objPerson->GetMostRecentMarriage()) && $objMarriage->MarriedToPerson) { $lstSpouse = new QListBox($this, $strControlId . 'id'); $lstSpouse->ActionParameter = $strControlId . 'nm'; if (!$objFormQuestion->RequiredFlag) { $lstSpouse->AddItem('- Select One -', null); } $lstSpouse->AddItem($objMarriage->MarriedToPerson->Name, $objMarriage->MarriedToPerson->Id, true); $lstSpouse->AddItem('- Other... -', false); $lstSpouse->AddAction(new QChangeEvent(), new QAjaxAction('lst_ToggleOther')); $lstSpouse->Name = $objFormQuestion->Question; if ($objFormQuestion->RequiredFlag) { $lstSpouse->Required = true; } $lstSpouse->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $lstSpouse; $txtName = new QTextBox($this, $strControlId . 'nm'); $txtName->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $txtName; $txtName->Visible = false; $txtName->Required = false; if ($objFormAnswer && strlen($objFormAnswer->TextValue)) { if ($lstSpouse->SelectedName != $objFormAnswer->TextValue) { $lstSpouse->SelectedIndex = count($lstSpouse->GetAllItems()) - 1; $txtName->Text = $objFormAnswer->TextValue; $this->lst_ToggleOther(null, $lstSpouse->ControlId, $lstSpouse->ActionParameter); } } } else { $lstSpouse = new QListBox($this, $strControlId . 'id'); $lstSpouse->Visible = false; if ($objFormQuestion->RequiredFlag) { $lstSpouse->Required = true; } $lstSpouse->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $lstSpouse; $txtName = new QTextBox($this, $strControlId . 'nm'); $txtName->Name = $objFormQuestion->Question; $txtName->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $txtName; $txtName->Visible = true; $txtName->Required = $objFormQuestion->RequiredFlag; if ($objFormAnswer && strlen($objFormAnswer->TextValue)) { $txtName->Text = $objFormAnswer->TextValue; } } } else { $txtName = new QTextBox($this, $strControlId . 'nm'); $txtName->Name = $objFormQuestion->Question; $txtName->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $txtName; $txtName->Visible = true; $txtName->Required = $objFormQuestion->RequiredFlag; if ($objFormAnswer && strlen($objFormAnswer->TextValue)) { $txtName->Text = $objFormAnswer->TextValue; } } break; case FormQuestionType::Address: if ($objPerson != null) { $objHouseholdArray = Household::LoadArrayBySharedHouseholds($objPerson, $this->objSignupEntry->SignupByPerson); if (count($objHouseholdArray) > 1) { // TODO: Implement! throw new Exception('TODO: Not Implemented'); } else { if (count($objHouseholdArray) == 1) { $objAddress = $objHouseholdArray[0]->GetCurrentAddress(); $rblAddress = new QRadioButtonList($this, $strControlId . 'switch'); $rblAddress->Name = $objFormQuestion->Question; $rblAddress->RenderMethod = 'RenderWithName'; $rblAddress->AddItem('Use Home Address Below', $objAddress->Id, true); $rblAddress->AddItem('Edit Home Address', false, false); $rblAddress->RepeatColumns = 2; $rblAddress->AddAction(new QClickEvent(), new QAjaxAction('rblAddress_Change')); $this->objFormQuestionControlArray[] = $rblAddress; } else { $objAddress = new Address(); $rblAddress = null; } } } $txtAddress1 = new QTextBox($this, $strControlId . 'address1'); $txtAddress1->Name = 'Address 1'; $txtAddress1->RenderMethod = 'RenderWithName'; $txtAddress1->Text = $objPerson != null ? $objAddress->Address1 : ''; $txtAddress2 = new QTextBox($this, $strControlId . 'address2'); $txtAddress2->Name = 'Address 2'; $txtAddress2->RenderMethod = 'RenderWithName'; $txtAddress2->Text = $objPerson != null ? $objAddress->Address2 : ''; $txtCity = new QTextBox($this, $strControlId . 'city'); $txtCity->Name = 'City, State and Zip'; $txtCity->RenderMethod = 'RenderWithName'; $txtCity->Text = $objPerson != null ? $objAddress->City : ''; $lstState = new QListBox($this, $strControlId . 'state'); $lstState->ActionParameter = '_' . $strControlId . 'city'; $lstState->Name = QApplication::Translate('State'); $lstState->RenderMethod = 'RenderWithError'; $lstState->AddItem(QApplication::Translate('- Select One -'), null); foreach (UsState::LoadAll(QQ::OrderBy(QQN::UsState()->Name)) as $objUsState) { if ($objPerson != null) { $lstState->AddItem($objUsState->Name, $objUsState->Abbreviation, $objAddress->State == $objUsState->Abbreviation); } else { $lstState->AddItem($objUsState->Name, $objUsState->Abbreviation, false); } } $txtZipCode = new QTextBox($this, $strControlId . 'zipcode'); $txtZipCode->ActionParameter = '_' . $strControlId . 'city'; $txtZipCode->Name = 'Zip Code'; $txtZipCode->RenderMethod = 'RenderWithError'; $txtZipCode->Text = $objPerson != null ? $objAddress->ZipCode : ''; $txtZipCode->Width = '80px'; if ($objFormQuestion->RequiredFlag) { $txtAddress1->Required = true; $txtCity->Required = true; $lstState->Required = true; $txtZipCode->Required = true; } $this->objFormQuestionControlArray[] = $txtAddress1; $this->objFormQuestionControlArray[] = $txtAddress2; $this->objFormQuestionControlArray[] = $txtCity; $this->objFormQuestionControlArray[] = $lstState; $this->objFormQuestionControlArray[] = $txtZipCode; // Final configuration based on whether or not we've got a household record for this person // (in which case we have defined a rblAddress) if ($objPerson != null) { if ($rblAddress) { // Check to see if the question has been answered before if ($objFormAnswer && strlen($objFormAnswer->TextValue)) { // If it $objAddress = Address::DeduceAddressFromFullLine($objFormAnswer->TextValue); if ($objFormAnswer->AddressId == $rblAddress->SelectedValue || !$objAddress) { $txtAddress1->Enabled = false; $txtAddress2->Enabled = false; $txtCity->Enabled = false; $lstState->Enabled = false; $txtZipCode->Enabled = false; } else { $txtAddress1->Text = $objAddress->Address1; $txtAddress2->Text = $objAddress->Address2; $txtCity->Text = $objAddress->City; $txtZipCode->Text = $objAddress->ZipCode; $lstState->SelectedValue = $objAddress->State; $rblAddress->SelectedIndex = 1; } // It has not -- let's default to having the address be presumed correct } else { $txtAddress1->Enabled = false; $txtAddress2->Enabled = false; $txtCity->Enabled = false; $lstState->Enabled = false; $txtZipCode->Enabled = false; } // No rblAddress - so let's update the address1 label to match the form question's question text } else { $txtAddress1->Name = $objFormQuestion->Question; } } break; case FormQuestionType::Age: $txtAge = new QIntegerTextBox($this, $strControlId . 'age'); $txtAge->Name = $objFormQuestion->Question; $txtAge->Minimum = 0; $txtAge->Maximum = 130; $txtAge->MaxLength = 3; if ($objFormAnswer && !is_null($objFormAnswer->IntegerValue)) { $txtAge->Text = $objFormAnswer->IntegerValue; } else { if ($objPerson != null) { if (!$objPerson->DobYearApproximateFlag && $objPerson->Age) { $txtAge->Text = $objPerson->Age; } } } if ($objFormQuestion->RequiredFlag) { $txtAge->Required = true; } $txtAge->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $txtAge; $txtAge->Width = '50px'; break; case FormQuestionType::DateofBirth: $dtxDateOfBirth = new QDateTimeTextBox($this, $strControlId . 'dob'); $dtxDateOfBirth->LabelForInvalid = 'For example, "Mar 20 1977"'; $dtxDateOfBirth->Name = $objFormQuestion->Question; if ($objFormAnswer && !is_null($objFormAnswer->DateValue)) { $dtxDateOfBirth->Text = $objFormAnswer->DateValue->ToString('MMM D YYYY'); } else { if ($objPerson != null) { if (!$objPerson->DobYearApproximateFlag && !$objPerson->DobGuessedFlag && $objPerson->DateOfBirth) { $dtxDateOfBirth->Text = $objPerson->DateOfBirth->ToString('MMM D YYYY'); } } } if ($objFormQuestion->RequiredFlag) { $dtxDateOfBirth->Required = true; } $dtxDateOfBirth->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $dtxDateOfBirth; $dtxDateOfBirth->Width = '150px'; break; case FormQuestionType::Gender: $lstGender = new QListBox($this, $strControlId . 'gender'); $lstGender->Name = $objFormQuestion->Question; $lstGender->AddItem('- Select One -', null); if ($objFormAnswer && $objFormAnswer->TextValue) { $lstGender->AddItem('Male', true, $objFormAnswer->BooleanValue); $lstGender->AddItem('Female', false, !$objFormAnswer->BooleanValue); } else { if ($objPerson != null) { $lstGender->AddItem('Male', true, $objPerson->Gender == 'M'); $lstGender->AddItem('Female', false, $objPerson->Gender == 'F'); } else { $lstGender->AddItem('Male', true, true); // just default to something $lstGender->AddItem('Female', false, false); } } if ($objFormQuestion->RequiredFlag) { $lstGender->Required = true; } $lstGender->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $lstGender; break; case FormQuestionType::Phone: $objPhoneArray = array(); if ($objPerson != null) { // Add Household Numbers (if applicable) foreach ($objPerson->GetHouseholdParticipationArray() as $objHouseholdParticipation) { foreach ($objHouseholdParticipation->Household->GetCurrentAddress()->GetPhoneArray() as $objPhone) { $objPhoneArray[] = $objPhone; } } // Add Personal Numbers foreach ($objPerson->GetPhoneArray() as $objPhone) { $objPhoneArray[] = $objPhone; } if (count($objPhoneArray)) { $lstPhone = new QListBox($this, $strControlId . 'id'); $lstPhone->ActionParameter = $strControlId . 'phone'; $lstPhone->Name = $objFormQuestion->Question; $lstPhone->AddItem('- Select One -', null); rsort($objPhoneArray); foreach ($objPhoneArray as $objPhone) { $lstPhone->AddItem($objPhone->Number, $objPhone->Id, $objFormAnswer && $objFormAnswer->PhoneId == $objPhone->Id); } $lstPhone->AddItem('- Other... -', false); if ($objFormQuestion->RequiredFlag) { $lstPhone->Required = true; } $lstPhone->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $lstPhone; $lstPhone->AddAction(new QChangeEvent(), new QAjaxAction('lst_ToggleOther')); } } $txtPhone = new PhoneTextBox($this, $strControlId . 'phone'); $this->objFormQuestionControlArray[] = $txtPhone; $txtPhone->RenderMethod = 'RenderWithName'; // We need to deduce whether or not we should show an explicit text-valued phone number from before if ($objPerson != null) { $blnExplicitlyTextValueOnly = $objFormAnswer && $objFormAnswer->TextValue && (!$lstPhone || !$lstPhone->SelectedValue); } else { $blnExplicitlyTextValueOnly = true; } if (count($objPhoneArray)) { if ($blnExplicitlyTextValueOnly) { $lstPhone->SelectedIndex = count($lstPhone->GetAllItems()) - 1; $txtPhone->Visible = true; $txtPhone->Required = $objFormQuestion->RequiredFlag; $txtPhone->Text = $objFormAnswer->TextValue; } else { $txtPhone->Visible = false; $txtPhone->Required = false; } } else { $txtPhone->Visible = true; $txtPhone->Required = $objFormQuestion->RequiredFlag; $txtPhone->Name = $objFormQuestion->Question; if ($blnExplicitlyTextValueOnly) { $txtPhone->Text = $objFormAnswer ? $objFormAnswer->TextValue : ''; } } break; case FormQuestionType::Email: $objEmailArray = array(); if ($objPerson != null) { // Add Personal Emails foreach ($objPerson->GetEmailArray() as $objEmail) { $objEmailArray[] = $objEmail; } if (count($objEmailArray)) { $lstEmail = new QListBox($this, $strControlId . 'id'); $lstEmail->ActionParameter = $strControlId . 'email'; $lstEmail->Name = $objFormQuestion->Question; $lstEmail->AddItem('- Select One -', null); rsort($objEmailArray); foreach ($objEmailArray as $objEmail) { $lstEmail->AddItem($objEmail->Address, $objEmail->Id, $objFormAnswer && $objFormAnswer->EmailId == $objEmail->Id); } $lstEmail->AddItem('- Other... -', false); if ($objFormQuestion->RequiredFlag) { $lstEmail->Required = true; } $lstEmail->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $lstEmail; $lstEmail->AddAction(new QChangeEvent(), new QAjaxAction('lst_ToggleOther')); } } $txtEmail = new QEmailTextBox($this, $strControlId . 'email'); $this->strEmailCtrlId = $strControlId . 'email'; $this->objFormQuestionControlArray[] = $txtEmail; $txtEmail->RenderMethod = 'RenderWithName'; // We need to deduce whether or not we should show an explicit text-valued email address from before if ($objPerson != null) { $blnExplicitlyTextValueOnly = $objFormAnswer && $objFormAnswer->TextValue && (!$lstEmail || !$lstEmail->SelectedValue); } else { $blnExplicitlyTextValueOnly = true; } if (count($objEmailArray)) { if ($blnExplicitlyTextValueOnly) { $lstEmail->SelectedIndex = count($lstEmail->GetAllItems()) - 1; $txtEmail->Visible = true; $txtEmail->Required = $objFormQuestion->RequiredFlag; $txtEmail->Text = $objFormAnswer->TextValue; } else { $txtEmail->Visible = false; $txtEmail->Required = false; } } else { $txtEmail->Visible = true; $txtEmail->Required = $objFormQuestion->RequiredFlag; $txtEmail->Name = $objFormQuestion->Question; if ($blnExplicitlyTextValueOnly) { $txtEmail->Text = $objFormAnswer ? $objFormAnswer->TextValue : ''; } } break; case FormQuestionType::ShortText: $txtAnswer = new QTextBox($this, $strControlId); $txtAnswer->Name = $objFormQuestion->Question; $txtAnswer->Required = $objFormQuestion->RequiredFlag; $txtAnswer->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $txtAnswer; if ($objFormAnswer) { $txtAnswer->Text = $objFormAnswer->TextValue; } break; case FormQuestionType::LongText: $txtAnswer = new QTextBox($this, $strControlId); $txtAnswer->Name = $objFormQuestion->Question; $txtAnswer->Required = $objFormQuestion->RequiredFlag; $txtAnswer->RenderMethod = 'RenderWithName'; $txtAnswer->TextMode = QTextMode::MultiLine; $this->objFormQuestionControlArray[] = $txtAnswer; if ($objFormAnswer) { $txtAnswer->Text = $objFormAnswer->TextValue; } break; case FormQuestionType::Number: $txtAnswer = new QIntegerTextBox($this, $strControlId); $txtAnswer->Name = $objFormQuestion->Question; $txtAnswer->Required = $objFormQuestion->RequiredFlag; $txtAnswer->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $txtAnswer; $txtAnswer->Width = '50px'; $txtAnswer->MaxLength = 6; if ($objFormAnswer) { $txtAnswer->Text = $objFormAnswer->IntegerValue; } break; case FormQuestionType::YesNo: $chkAnswer = new QCheckBox($this, $strControlId); $chkAnswer->Name = $objFormQuestion->Question; $chkAnswer->Text = trim($objFormQuestion->Options); $chkAnswer->Required = $objFormQuestion->RequiredFlag; $chkAnswer->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $chkAnswer; if ($objFormAnswer) { $chkAnswer->Checked = $objFormAnswer->BooleanValue; } break; case FormQuestionType::SingleSelect: $lstAnswer = new QListBox($this, $strControlId); $lstAnswer->Name = $objFormQuestion->Question; $lstAnswer->Required = $objFormQuestion->RequiredFlag; $lstAnswer->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $lstAnswer; $lstAnswer->AddItem('- Select One -', null); foreach (explode("\n", trim($objFormQuestion->Options)) as $strItem) { if (strlen($strItem = trim($strItem))) { $lstAnswer->AddItem($strItem, $strItem, $objFormAnswer && $objFormAnswer->TextValue == $strItem); } } if ($objFormQuestion->AllowOtherFlag) { $lstAnswer->ActionParameter = $strControlId . 'other'; $lstAnswer->AddAction(new QChangeEvent(), new QAjaxAction('lst_ToggleOther')); $lstAnswer->AddItem('- Other... -', false); $txtAnswer = new QTextBox($this, $strControlId . 'other'); $txtAnswer->RenderMethod = 'RenderWithName'; $txtAnswer->Required = false; $txtAnswer->Visible = false; $this->objFormQuestionControlArray[] = $txtAnswer; } if ($objFormAnswer && strlen($objFormAnswer->TextValue) && !$lstAnswer->SelectedValue) { if ($objFormQuestion->AllowOtherFlag) { $lstAnswer->SelectedIndex = count($lstAnswer->GetAllItems()) - 1; $txtAnswer->Text = $objFormAnswer->TextValue; $txtAnswer->Visible = true; } else { $lstAnswer->AddItem($objFormAnswer->TextValue, $objFormAnswer->TextValue, true); } } break; case FormQuestionType::MultipleSelect: $strAnswerArray = array(); if ($objFormAnswer) { foreach (explode("\n", trim($objFormAnswer->TextValue)) as $strAnswer) { if (strlen($strAnswer = trim($strAnswer))) { $strAnswerArray[$strAnswer] = $strAnswer; } } } // GJS - Change to check boxes instead of multi select $chkAnswer = new QCheckBoxList($this, $strControlId); $chkAnswer->Name = $objFormQuestion->Question; $chkAnswer->RenderMethod = 'RenderWithName'; $this->objFormQuestionControlArray[] = $chkAnswer; foreach (explode("\n", trim($objFormQuestion->Options)) as $strItem) { if (strlen($strItem = trim($strItem))) { $chkAnswer->AddItem($strItem, $strItem, array_key_exists($strItem, $strAnswerArray)); $strAnswerArray[$strItem] = null; unset($strAnswerArray[$strItem]); } } foreach ($strAnswerArray as $strAnswer) { $chkAnswer->AddItem($strAnswer, $strAnswer, true); } if ($objFormQuestion->AllowOtherFlag) { $txtAnswer = new QTextBox($this, $strControlId . 'other'); $txtAnswer->RenderMethod = 'RenderWithName'; $txtAnswer->HtmlBefore = 'Add another option and hit <strong>Enter</strong>:<br/>'; $txtAnswer->Visible = true; $txtAnswer->ActionParameter = $strControlId; $txtAnswer->AddAction(new QEnterKeyEvent(), new QAjaxAction('txtMultipleSelectOther_Enter')); $this->objFormQuestionControlArray[] = $txtAnswer; } break; case FormQuestionType::Instructions: $lblAnswer = new QLabel($this, $strControlId); $lblAnswer->HtmlEntities = false; $lblAnswer->Text = nl2br(QApplication::HtmlEntities(trim($objFormQuestion->Options)), true); if (strlen($strLabel = trim($objFormQuestion->Question))) { $lblAnswer->Name = $strLabel; $lblAnswer->RenderMethod = 'RenderWithName'; } else { $lblAnswer->RenderMethod = 'Render'; } $this->objFormQuestionControlArray[] = $lblAnswer; break; default: throw new Exception('Invalid FormQuestionTypeId: ' . $objFormQuestion->FormQuestionTypeId); } } }
public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects) { if ($objObject->objPerson) { $objObject->objPerson = Person::GetSoapObjectFromObject($objObject->objPerson, false); } else { if (!$blnBindRelatedObjects) { $objObject->intPersonId = null; } } if ($objObject->objHousehold) { $objObject->objHousehold = Household::GetSoapObjectFromObject($objObject->objHousehold, false); } else { if (!$blnBindRelatedObjects) { $objObject->intHouseholdId = null; } } return $objObject; }
/** * Refresh this MetaControl with Data from the local ParentPagerHousehold object. * @param boolean $blnReload reload ParentPagerHousehold from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objParentPagerHousehold->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objParentPagerHousehold->Id; } } if ($this->txtServerIdentifier) { $this->txtServerIdentifier->Text = $this->objParentPagerHousehold->ServerIdentifier; } if ($this->lblServerIdentifier) { $this->lblServerIdentifier->Text = $this->objParentPagerHousehold->ServerIdentifier; } if ($this->lstHousehold) { $this->lstHousehold->RemoveAllItems(); $this->lstHousehold->AddItem(QApplication::Translate('- Select One -'), null); $objHouseholdArray = Household::LoadAll(); if ($objHouseholdArray) { foreach ($objHouseholdArray as $objHousehold) { $objListItem = new QListItem($objHousehold->__toString(), $objHousehold->Id); if ($this->objParentPagerHousehold->Household && $this->objParentPagerHousehold->Household->Id == $objHousehold->Id) { $objListItem->Selected = true; } $this->lstHousehold->AddItem($objListItem); } } } if ($this->lblHouseholdId) { $this->lblHouseholdId->Text = $this->objParentPagerHousehold->Household ? $this->objParentPagerHousehold->Household->__toString() : null; } if ($this->chkHiddenFlag) { $this->chkHiddenFlag->Checked = $this->objParentPagerHousehold->HiddenFlag; } if ($this->lblHiddenFlag) { $this->lblHiddenFlag->Text = $this->objParentPagerHousehold->HiddenFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->lstParentPagerSyncStatusType) { $this->lstParentPagerSyncStatusType->SelectedValue = $this->objParentPagerHousehold->ParentPagerSyncStatusTypeId; } if ($this->lblParentPagerSyncStatusTypeId) { $this->lblParentPagerSyncStatusTypeId->Text = $this->objParentPagerHousehold->ParentPagerSyncStatusTypeId ? ParentPagerSyncStatusType::$NameArray[$this->objParentPagerHousehold->ParentPagerSyncStatusTypeId] : null; } if ($this->txtName) { $this->txtName->Text = $this->objParentPagerHousehold->Name; } if ($this->lblName) { $this->lblName->Text = $this->objParentPagerHousehold->Name; } }
/** * Gets an array of Household objects shared by two people (e.g. all households where both people are participants. * @param Person $objPerson1 * @param Person $objPerson2 */ public static function LoadArrayBySharedHouseholds(Person $objPerson1, Person $objPerson2) { $intSharedHouseholdIdArray = array(); foreach ($objPerson1->GetHouseholdParticipationArray() as $objHouseholdParticipation) { $intSharedHouseholdIdArray[] = $objHouseholdParticipation->HouseholdId; } return Household::QueryArray(QQ::AndCondition(QQ::Equal(QQN::Household()->HouseholdParticipation->PersonId, $objPerson2->Id), QQ::In(QQN::Household()->Id, $intSharedHouseholdIdArray))); }
function showAssignSample() { $assignids = loadvar('assignid'); $selurid = loadvar('selurid'); if (sizeof($assignids) > 0 && ($selurid > 0 || $selurid == -1)) { //-1: back to sysadmin foreach ($assignids as $id) { //sysadmin mode: change on server 'only' $household = new Household($id); $household->setUrid($selurid); $household->saveChanges(); $respondents = $household->getRespondents(); foreach ($respondents as $respondent) { $respondent->setUrid($selurid); $respondent->saveChanges(); } $communication = new Communication(); $communication->assignHousehold($household, $selurid); } if (dbConfig::defaultPanel() == PANEL_HOUSEHOLD) { $message = Language::labelSupervisorHouseholdAssigned(); } else { $message = Language::labelSupervisorRespondentAssigned(); } } else { if (dbConfig::defaultPanel() == PANEL_HOUSEHOLD) { $message = Language::labelSupervisorHouseholdsNotAssigned(); } else { $message = Language::labelSupervisorRespondentsNotAssigned(); } } $display = new Display(); return $this->showUnassignedSample($display->displayInfo($message)); }
/** * Refresh this MetaControl with Data from the local HouseholdParticipation object. * @param boolean $blnReload reload HouseholdParticipation from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objHouseholdParticipation->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objHouseholdParticipation->Id; } } if ($this->lstPerson) { $this->lstPerson->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null); } $objPersonArray = Person::LoadAll(); if ($objPersonArray) { foreach ($objPersonArray as $objPerson) { $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id); if ($this->objHouseholdParticipation->Person && $this->objHouseholdParticipation->Person->Id == $objPerson->Id) { $objListItem->Selected = true; } $this->lstPerson->AddItem($objListItem); } } } if ($this->lblPersonId) { $this->lblPersonId->Text = $this->objHouseholdParticipation->Person ? $this->objHouseholdParticipation->Person->__toString() : null; } if ($this->lstHousehold) { $this->lstHousehold->RemoveAllItems(); if (!$this->blnEditMode) { $this->lstHousehold->AddItem(QApplication::Translate('- Select One -'), null); } $objHouseholdArray = Household::LoadAll(); if ($objHouseholdArray) { foreach ($objHouseholdArray as $objHousehold) { $objListItem = new QListItem($objHousehold->__toString(), $objHousehold->Id); if ($this->objHouseholdParticipation->Household && $this->objHouseholdParticipation->Household->Id == $objHousehold->Id) { $objListItem->Selected = true; } $this->lstHousehold->AddItem($objListItem); } } } if ($this->lblHouseholdId) { $this->lblHouseholdId->Text = $this->objHouseholdParticipation->Household ? $this->objHouseholdParticipation->Household->__toString() : null; } if ($this->txtRole) { $this->txtRole->Text = $this->objHouseholdParticipation->Role; } if ($this->lblRole) { $this->lblRole->Text = $this->objHouseholdParticipation->Role; } if ($this->txtRoleOverride) { $this->txtRoleOverride->Text = $this->objHouseholdParticipation->RoleOverride; } if ($this->lblRoleOverride) { $this->lblRoleOverride->Text = $this->objHouseholdParticipation->RoleOverride; } }
$headers = 'From: ' . $fromaddress . "\r\n" . 'Reply-To: ' . $fromaddress . "\r\n" . 'Return-Path: <>' . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; //$headers .= "Content-type: text/plain; charset=ISO-8859-1"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $arr = explode(";", $toaddress); foreach ($arr as $a) { mail($a, $subject, $message, $headers); } } /* myhh functions */ function getHHInfoPreload() { global $engine; $household = new Household($engine->getPrimaryKey()); $respondents = $household->getRespondents(); $cnt = 1;
public static function GetSoapArrayFromArray($objArray) { if (!$objArray) { return null; } $objArrayToReturn = array(); foreach ($objArray as $objObject) { array_push($objArrayToReturn, Household::GetSoapObjectFromObject($objObject, true)); } return unserialize(serialize($objArrayToReturn)); }
protected function SaveSpouse() { // Fixup Middle $this->txtSpouseMiddleName->Text = trim($this->txtSpouseMiddleName->Text); if (strlen($this->txtSpouseMiddleName->Text) == 1) { $this->txtSpouseMiddleName->Text = strtoupper($this->txtSpouseMiddleName->Text); } else { if (strlen($this->txtSpouseMiddleName->Text) == 2 && $this->txtSpouseMiddleName->Text[1] == '.') { $this->txtSpouseMiddleName->Text = strtoupper($this->txtSpouseMiddleName->Text[0]); } } // Update Gender and Types and Save $this->mctSpouse->Person->Gender = $this->lstSpouseGender->SelectedValue; $this->mctSpouse->Person->MembershipStatusTypeId = MembershipStatusType::NonMember; $this->mctSpouse->Person->MaritalStatusTypeId = MaritalStatusType::NotSpecified; $this->mctSpouse->Person->DeceasedFlag = false; $this->mctSpouse->SavePerson(); $this->mctSpouse->Person->RefreshNameItemAssociations(); // Is there a home address? if ($objHousehold = Household::LoadByHeadPersonId($this->mctPerson->Person->Id)) { $objHousehold->AssociatePerson($this->mctSpouse->Person); } // Email if (trim($this->txtSpouseEmail->Text)) { $objEmail = new Email(); $objEmail->Person = $this->mctSpouse->Person; $objEmail->Address = trim($this->txtSpouseEmail->Text); $objEmail->Save(); $this->mctSpouse->Person->PrimaryEmail = $objEmail; } // Phones if (trim($this->txtSpouseCellPhone->Text)) { $objPhone = new Phone(); $objPhone->PhoneTypeId = PhoneType::Mobile; $objPhone->Person = $this->mctSpouse->Person; $objPhone->Number = trim($this->txtSpouseCellPhone->Text); $objPhone->MobileProviderId = $this->lstSpouseMobileProvider->SelectedValue; $objPhone->Save(); $this->mctSpouse->Person->PrimaryPhone = $objPhone; } if (trim($this->txtSpouseHomePhone->Text)) { if ($this->txtSpouseHomePhone->Text != $this->txtPersonHomePhone->Text) { $objPhone = new Phone(); $objPhone->PhoneTypeId = PhoneType::Home; $objPhone->Number = trim($this->txtSpouseHomePhone->Text); if ($objHousehold) { $objPhone->Address = $this->mctAddress->Address; } else { $objPhone->Person = $this->mctSpouse->Person; } $objPhone->Save(); } else { $objPhone = $this->objHomePhone; } if (!$this->mctSpouse->Person->PrimaryPhone) { $this->mctSpouse->Person->PrimaryPhone = $objPhone; } if ($this->mctAddress->Address->Id && !$this->mctAddress->Address->PrimaryPhone) { $this->mctAddress->Address->PrimaryPhone = $objPhone; $this->mctAddress->Address->Save(); } } if (trim($this->txtSpouseWorkPhone->Text)) { $objPhone = new Phone(); $objPhone->PhoneTypeId = PhoneType::Work; $objPhone->Person = $this->mctSpouse->Person; $objPhone->Number = trim($this->txtSpouseWorkPhone->Text); $objPhone->Save(); if (!$this->mctSpouse->Person->PrimaryPhone) { $this->mctSpouse->Person->PrimaryPhone = $objPhone; } } }
/** * Refresh this MetaControl with Data from the local Address object. * @param boolean $blnReload reload Address from the database * @return void */ public function Refresh($blnReload = false) { if ($blnReload) { $this->objAddress->Reload(); } if ($this->lblId) { if ($this->blnEditMode) { $this->lblId->Text = $this->objAddress->Id; } } if ($this->lstAddressType) { $this->lstAddressType->SelectedValue = $this->objAddress->AddressTypeId; } if ($this->lblAddressTypeId) { $this->lblAddressTypeId->Text = $this->objAddress->AddressTypeId ? AddressType::$NameArray[$this->objAddress->AddressTypeId] : null; } if ($this->lstPerson) { $this->lstPerson->RemoveAllItems(); $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null); $objPersonArray = Person::LoadAll(); if ($objPersonArray) { foreach ($objPersonArray as $objPerson) { $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id); if ($this->objAddress->Person && $this->objAddress->Person->Id == $objPerson->Id) { $objListItem->Selected = true; } $this->lstPerson->AddItem($objListItem); } } } if ($this->lblPersonId) { $this->lblPersonId->Text = $this->objAddress->Person ? $this->objAddress->Person->__toString() : null; } if ($this->lstHousehold) { $this->lstHousehold->RemoveAllItems(); $this->lstHousehold->AddItem(QApplication::Translate('- Select One -'), null); $objHouseholdArray = Household::LoadAll(); if ($objHouseholdArray) { foreach ($objHouseholdArray as $objHousehold) { $objListItem = new QListItem($objHousehold->__toString(), $objHousehold->Id); if ($this->objAddress->Household && $this->objAddress->Household->Id == $objHousehold->Id) { $objListItem->Selected = true; } $this->lstHousehold->AddItem($objListItem); } } } if ($this->lblHouseholdId) { $this->lblHouseholdId->Text = $this->objAddress->Household ? $this->objAddress->Household->__toString() : null; } if ($this->lstPrimaryPhone) { $this->lstPrimaryPhone->RemoveAllItems(); $this->lstPrimaryPhone->AddItem(QApplication::Translate('- Select One -'), null); $objPrimaryPhoneArray = Phone::LoadAll(); if ($objPrimaryPhoneArray) { foreach ($objPrimaryPhoneArray as $objPrimaryPhone) { $objListItem = new QListItem($objPrimaryPhone->__toString(), $objPrimaryPhone->Id); if ($this->objAddress->PrimaryPhone && $this->objAddress->PrimaryPhone->Id == $objPrimaryPhone->Id) { $objListItem->Selected = true; } $this->lstPrimaryPhone->AddItem($objListItem); } } } if ($this->lblPrimaryPhoneId) { $this->lblPrimaryPhoneId->Text = $this->objAddress->PrimaryPhone ? $this->objAddress->PrimaryPhone->__toString() : null; } if ($this->txtAddress1) { $this->txtAddress1->Text = $this->objAddress->Address1; } if ($this->lblAddress1) { $this->lblAddress1->Text = $this->objAddress->Address1; } if ($this->txtAddress2) { $this->txtAddress2->Text = $this->objAddress->Address2; } if ($this->lblAddress2) { $this->lblAddress2->Text = $this->objAddress->Address2; } if ($this->txtAddress3) { $this->txtAddress3->Text = $this->objAddress->Address3; } if ($this->lblAddress3) { $this->lblAddress3->Text = $this->objAddress->Address3; } if ($this->txtCity) { $this->txtCity->Text = $this->objAddress->City; } if ($this->lblCity) { $this->lblCity->Text = $this->objAddress->City; } if ($this->txtState) { $this->txtState->Text = $this->objAddress->State; } if ($this->lblState) { $this->lblState->Text = $this->objAddress->State; } if ($this->txtZipCode) { $this->txtZipCode->Text = $this->objAddress->ZipCode; } if ($this->lblZipCode) { $this->lblZipCode->Text = $this->objAddress->ZipCode; } if ($this->txtCountry) { $this->txtCountry->Text = $this->objAddress->Country; } if ($this->lblCountry) { $this->lblCountry->Text = $this->objAddress->Country; } if ($this->chkCurrentFlag) { $this->chkCurrentFlag->Checked = $this->objAddress->CurrentFlag; } if ($this->lblCurrentFlag) { $this->lblCurrentFlag->Text = $this->objAddress->CurrentFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->chkInvalidFlag) { $this->chkInvalidFlag->Checked = $this->objAddress->InvalidFlag; } if ($this->lblInvalidFlag) { $this->lblInvalidFlag->Text = $this->objAddress->InvalidFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->chkVerificationCheckedFlag) { $this->chkVerificationCheckedFlag->Checked = $this->objAddress->VerificationCheckedFlag; } if ($this->lblVerificationCheckedFlag) { $this->lblVerificationCheckedFlag->Text = $this->objAddress->VerificationCheckedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } if ($this->calDateUntilWhen) { $this->calDateUntilWhen->DateTime = $this->objAddress->DateUntilWhen; } if ($this->lblDateUntilWhen) { $this->lblDateUntilWhen->Text = sprintf($this->objAddress->DateUntilWhen) ? $this->objAddress->__toString($this->strDateUntilWhenDateTimeFormat) : null; } if ($this->chkInternationalFlag) { $this->chkInternationalFlag->Checked = $this->objAddress->InternationalFlag; } if ($this->lblInternationalFlag) { $this->lblInternationalFlag->Text = $this->objAddress->InternationalFlag ? QApplication::Translate('Yes') : QApplication::Translate('No'); } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'MembershipStatusTypeId': // Gets the value for intMembershipStatusTypeId (Not Null) // @return integer return $this->intMembershipStatusTypeId; case 'MaritalStatusTypeId': // Gets the value for intMaritalStatusTypeId (Not Null) // @return integer return $this->intMaritalStatusTypeId; case 'FirstName': // Gets the value for strFirstName // @return string return $this->strFirstName; case 'MiddleName': // Gets the value for strMiddleName // @return string return $this->strMiddleName; case 'LastName': // Gets the value for strLastName // @return string return $this->strLastName; case 'MailingLabel': // Gets the value for strMailingLabel // @return string return $this->strMailingLabel; case 'PriorLastNames': // Gets the value for strPriorLastNames // @return string return $this->strPriorLastNames; case 'Nickname': // Gets the value for strNickname // @return string return $this->strNickname; case 'Title': // Gets the value for strTitle // @return string return $this->strTitle; case 'Suffix': // Gets the value for strSuffix // @return string return $this->strSuffix; case 'Gender': // Gets the value for strGender // @return string return $this->strGender; case 'DateOfBirth': // Gets the value for dttDateOfBirth // @return QDateTime return $this->dttDateOfBirth; case 'DobYearApproximateFlag': // Gets the value for blnDobYearApproximateFlag // @return boolean return $this->blnDobYearApproximateFlag; case 'DobGuessedFlag': // Gets the value for blnDobGuessedFlag // @return boolean return $this->blnDobGuessedFlag; case 'Age': // Gets the value for intAge // @return integer return $this->intAge; case 'DeceasedFlag': // Gets the value for blnDeceasedFlag (Not Null) // @return boolean return $this->blnDeceasedFlag; case 'DateDeceased': // Gets the value for dttDateDeceased // @return QDateTime return $this->dttDateDeceased; case 'CurrentHeadShotId': // Gets the value for intCurrentHeadShotId (Unique) // @return integer return $this->intCurrentHeadShotId; case 'MailingAddressId': // Gets the value for intMailingAddressId // @return integer return $this->intMailingAddressId; case 'StewardshipAddressId': // Gets the value for intStewardshipAddressId // @return integer return $this->intStewardshipAddressId; case 'PrimaryPhoneId': // Gets the value for intPrimaryPhoneId // @return integer return $this->intPrimaryPhoneId; case 'PrimaryEmailId': // Gets the value for intPrimaryEmailId (Unique) // @return integer return $this->intPrimaryEmailId; case 'CanMailFlag': // Gets the value for blnCanMailFlag // @return boolean return $this->blnCanMailFlag; case 'CanPhoneFlag': // Gets the value for blnCanPhoneFlag // @return boolean return $this->blnCanPhoneFlag; case 'CanEmailFlag': // Gets the value for blnCanEmailFlag // @return boolean return $this->blnCanEmailFlag; case 'PrimaryAddressText': // Gets the value for strPrimaryAddressText // @return string return $this->strPrimaryAddressText; case 'PrimaryCityText': // Gets the value for strPrimaryCityText // @return string return $this->strPrimaryCityText; case 'PrimaryStateText': // Gets the value for strPrimaryStateText // @return string return $this->strPrimaryStateText; case 'PrimaryZipCodeText': // Gets the value for strPrimaryZipCodeText // @return string return $this->strPrimaryZipCodeText; case 'PrimaryPhoneText': // Gets the value for strPrimaryPhoneText // @return string return $this->strPrimaryPhoneText; case 'PublicCreationFlag': // Gets the value for blnPublicCreationFlag // @return boolean return $this->blnPublicCreationFlag; case 'CoPrimary': // Gets the value for intCoPrimary // @return integer return $this->intCoPrimary; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'CurrentHeadShot': // Gets the value for the HeadShot object referenced by intCurrentHeadShotId (Unique) // @return HeadShot try { if (!$this->objCurrentHeadShot && !is_null($this->intCurrentHeadShotId)) { $this->objCurrentHeadShot = HeadShot::Load($this->intCurrentHeadShotId); } return $this->objCurrentHeadShot; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'MailingAddress': // Gets the value for the Address object referenced by intMailingAddressId // @return Address try { if (!$this->objMailingAddress && !is_null($this->intMailingAddressId)) { $this->objMailingAddress = Address::Load($this->intMailingAddressId); } return $this->objMailingAddress; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'StewardshipAddress': // Gets the value for the Address object referenced by intStewardshipAddressId // @return Address try { if (!$this->objStewardshipAddress && !is_null($this->intStewardshipAddressId)) { $this->objStewardshipAddress = Address::Load($this->intStewardshipAddressId); } return $this->objStewardshipAddress; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'PrimaryPhone': // Gets the value for the Phone object referenced by intPrimaryPhoneId // @return Phone try { if (!$this->objPrimaryPhone && !is_null($this->intPrimaryPhoneId)) { $this->objPrimaryPhone = Phone::Load($this->intPrimaryPhoneId); } return $this->objPrimaryPhone; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'PrimaryEmail': // Gets the value for the Email object referenced by intPrimaryEmailId (Unique) // @return Email try { if (!$this->objPrimaryEmail && !is_null($this->intPrimaryEmailId)) { $this->objPrimaryEmail = Email::Load($this->intPrimaryEmailId); } return $this->objPrimaryEmail; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CoPrimaryObject': // Gets the value for the Person object referenced by intCoPrimary // @return Person try { if (!$this->objCoPrimaryObject && !is_null($this->intCoPrimary)) { $this->objCoPrimaryObject = Person::Load($this->intCoPrimary); } return $this->objCoPrimaryObject; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'HouseholdAsHead': // Gets the value for the Household object that uniquely references this Person // by objHouseholdAsHead (Unique) // @return Household try { if ($this->objHouseholdAsHead === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objHouseholdAsHead) { $this->objHouseholdAsHead = Household::LoadByHeadPersonId($this->intId); } return $this->objHouseholdAsHead; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'PublicLogin': // Gets the value for the PublicLogin object that uniquely references this Person // by objPublicLogin (Unique) // @return PublicLogin try { if ($this->objPublicLogin === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objPublicLogin) { $this->objPublicLogin = PublicLogin::LoadByPersonId($this->intId); } return $this->objPublicLogin; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '_CheckingAccountLookup': // Gets the value for the private _objCheckingAccountLookup (Read-Only) // if set due to an expansion on the checkingaccountlookup_person_assn association table // @return CheckingAccountLookup return $this->_objCheckingAccountLookup; case '_CheckingAccountLookupArray': // Gets the value for the private _objCheckingAccountLookupArray (Read-Only) // if set due to an ExpandAsArray on the checkingaccountlookup_person_assn association table // @return CheckingAccountLookup[] return (array) $this->_objCheckingAccountLookupArray; case '_CommunicationList': // Gets the value for the private _objCommunicationList (Read-Only) // if set due to an expansion on the communicationlist_person_assn association table // @return CommunicationList return $this->_objCommunicationList; case '_CommunicationListArray': // Gets the value for the private _objCommunicationListArray (Read-Only) // if set due to an ExpandAsArray on the communicationlist_person_assn association table // @return CommunicationList[] return (array) $this->_objCommunicationListArray; case '_NameItem': // Gets the value for the private _objNameItem (Read-Only) // if set due to an expansion on the person_nameitem_assn association table // @return NameItem return $this->_objNameItem; case '_NameItemArray': // Gets the value for the private _objNameItemArray (Read-Only) // if set due to an ExpandAsArray on the person_nameitem_assn association table // @return NameItem[] return (array) $this->_objNameItemArray; case '_Address': // Gets the value for the private _objAddress (Read-Only) // if set due to an expansion on the address.person_id reverse relationship // @return Address return $this->_objAddress; case '_AddressArray': // Gets the value for the private _objAddressArray (Read-Only) // if set due to an ExpandAsArray on the address.person_id reverse relationship // @return Address[] return (array) $this->_objAddressArray; case '_AttributeValue': // Gets the value for the private _objAttributeValue (Read-Only) // if set due to an expansion on the attribute_value.person_id reverse relationship // @return AttributeValue return $this->_objAttributeValue; case '_AttributeValueArray': // Gets the value for the private _objAttributeValueArray (Read-Only) // if set due to an ExpandAsArray on the attribute_value.person_id reverse relationship // @return AttributeValue[] return (array) $this->_objAttributeValueArray; case '_ClassRegistration': // Gets the value for the private _objClassRegistration (Read-Only) // if set due to an expansion on the class_registration.person_id reverse relationship // @return ClassRegistration return $this->_objClassRegistration; case '_ClassRegistrationArray': // Gets the value for the private _objClassRegistrationArray (Read-Only) // if set due to an ExpandAsArray on the class_registration.person_id reverse relationship // @return ClassRegistration[] return (array) $this->_objClassRegistrationArray; case '_Comment': // Gets the value for the private _objComment (Read-Only) // if set due to an expansion on the comment.person_id reverse relationship // @return Comment return $this->_objComment; case '_CommentArray': // Gets the value for the private _objCommentArray (Read-Only) // if set due to an ExpandAsArray on the comment.person_id reverse relationship // @return Comment[] return (array) $this->_objCommentArray; case '_Email': // Gets the value for the private _objEmail (Read-Only) // if set due to an expansion on the email.person_id reverse relationship // @return Email return $this->_objEmail; case '_EmailArray': // Gets the value for the private _objEmailArray (Read-Only) // if set due to an ExpandAsArray on the email.person_id reverse relationship // @return Email[] return (array) $this->_objEmailArray; case '_EmailMessageRoute': // Gets the value for the private _objEmailMessageRoute (Read-Only) // if set due to an expansion on the email_message_route.person_id reverse relationship // @return EmailMessageRoute return $this->_objEmailMessageRoute; case '_EmailMessageRouteArray': // Gets the value for the private _objEmailMessageRouteArray (Read-Only) // if set due to an ExpandAsArray on the email_message_route.person_id reverse relationship // @return EmailMessageRoute[] return (array) $this->_objEmailMessageRouteArray; case '_GroupAuthorizedSender': // Gets the value for the private _objGroupAuthorizedSender (Read-Only) // if set due to an expansion on the group_authorized_sender.person_id reverse relationship // @return GroupAuthorizedSender return $this->_objGroupAuthorizedSender; case '_GroupAuthorizedSenderArray': // Gets the value for the private _objGroupAuthorizedSenderArray (Read-Only) // if set due to an ExpandAsArray on the group_authorized_sender.person_id reverse relationship // @return GroupAuthorizedSender[] return (array) $this->_objGroupAuthorizedSenderArray; case '_GroupParticipation': // Gets the value for the private _objGroupParticipation (Read-Only) // if set due to an expansion on the group_participation.person_id reverse relationship // @return GroupParticipation return $this->_objGroupParticipation; case '_GroupParticipationArray': // Gets the value for the private _objGroupParticipationArray (Read-Only) // if set due to an ExpandAsArray on the group_participation.person_id reverse relationship // @return GroupParticipation[] return (array) $this->_objGroupParticipationArray; case '_HeadShot': // Gets the value for the private _objHeadShot (Read-Only) // if set due to an expansion on the head_shot.person_id reverse relationship // @return HeadShot return $this->_objHeadShot; case '_HeadShotArray': // Gets the value for the private _objHeadShotArray (Read-Only) // if set due to an ExpandAsArray on the head_shot.person_id reverse relationship // @return HeadShot[] return (array) $this->_objHeadShotArray; case '_HouseholdParticipation': // Gets the value for the private _objHouseholdParticipation (Read-Only) // if set due to an expansion on the household_participation.person_id reverse relationship // @return HouseholdParticipation return $this->_objHouseholdParticipation; case '_HouseholdParticipationArray': // Gets the value for the private _objHouseholdParticipationArray (Read-Only) // if set due to an ExpandAsArray on the household_participation.person_id reverse relationship // @return HouseholdParticipation[] return (array) $this->_objHouseholdParticipationArray; case '_Marriage': // Gets the value for the private _objMarriage (Read-Only) // if set due to an expansion on the marriage.person_id reverse relationship // @return Marriage return $this->_objMarriage; case '_MarriageArray': // Gets the value for the private _objMarriageArray (Read-Only) // if set due to an ExpandAsArray on the marriage.person_id reverse relationship // @return Marriage[] return (array) $this->_objMarriageArray; case '_MarriageAsMarriedTo': // Gets the value for the private _objMarriageAsMarriedTo (Read-Only) // if set due to an expansion on the marriage.married_to_person_id reverse relationship // @return Marriage return $this->_objMarriageAsMarriedTo; case '_MarriageAsMarriedToArray': // Gets the value for the private _objMarriageAsMarriedToArray (Read-Only) // if set due to an ExpandAsArray on the marriage.married_to_person_id reverse relationship // @return Marriage[] return (array) $this->_objMarriageAsMarriedToArray; case '_Membership': // Gets the value for the private _objMembership (Read-Only) // if set due to an expansion on the membership.person_id reverse relationship // @return Membership return $this->_objMembership; case '_MembershipArray': // Gets the value for the private _objMembershipArray (Read-Only) // if set due to an ExpandAsArray on the membership.person_id reverse relationship // @return Membership[] return (array) $this->_objMembershipArray; case '_OnlineDonation': // Gets the value for the private _objOnlineDonation (Read-Only) // if set due to an expansion on the online_donation.person_id reverse relationship // @return OnlineDonation return $this->_objOnlineDonation; case '_OnlineDonationArray': // Gets the value for the private _objOnlineDonationArray (Read-Only) // if set due to an ExpandAsArray on the online_donation.person_id reverse relationship // @return OnlineDonation[] return (array) $this->_objOnlineDonationArray; case '_OtherContactInfo': // Gets the value for the private _objOtherContactInfo (Read-Only) // if set due to an expansion on the other_contact_info.person_id reverse relationship // @return OtherContactInfo return $this->_objOtherContactInfo; case '_OtherContactInfoArray': // Gets the value for the private _objOtherContactInfoArray (Read-Only) // if set due to an ExpandAsArray on the other_contact_info.person_id reverse relationship // @return OtherContactInfo[] return (array) $this->_objOtherContactInfoArray; case '_ParentPagerIndividual': // Gets the value for the private _objParentPagerIndividual (Read-Only) // if set due to an expansion on the parent_pager_individual.person_id reverse relationship // @return ParentPagerIndividual return $this->_objParentPagerIndividual; case '_ParentPagerIndividualArray': // Gets the value for the private _objParentPagerIndividualArray (Read-Only) // if set due to an ExpandAsArray on the parent_pager_individual.person_id reverse relationship // @return ParentPagerIndividual[] return (array) $this->_objParentPagerIndividualArray; case '_PersonAsCoPrimary': // Gets the value for the private _objPersonAsCoPrimary (Read-Only) // if set due to an expansion on the person.co_primary reverse relationship // @return Person return $this->_objPersonAsCoPrimary; case '_PersonAsCoPrimaryArray': // Gets the value for the private _objPersonAsCoPrimaryArray (Read-Only) // if set due to an ExpandAsArray on the person.co_primary reverse relationship // @return Person[] return (array) $this->_objPersonAsCoPrimaryArray; case '_Phone': // Gets the value for the private _objPhone (Read-Only) // if set due to an expansion on the phone.person_id reverse relationship // @return Phone return $this->_objPhone; case '_PhoneArray': // Gets the value for the private _objPhoneArray (Read-Only) // if set due to an ExpandAsArray on the phone.person_id reverse relationship // @return Phone[] return (array) $this->_objPhoneArray; case '_Relationship': // Gets the value for the private _objRelationship (Read-Only) // if set due to an expansion on the relationship.person_id reverse relationship // @return Relationship return $this->_objRelationship; case '_RelationshipArray': // Gets the value for the private _objRelationshipArray (Read-Only) // if set due to an ExpandAsArray on the relationship.person_id reverse relationship // @return Relationship[] return (array) $this->_objRelationshipArray; case '_RelationshipAsRelatedTo': // Gets the value for the private _objRelationshipAsRelatedTo (Read-Only) // if set due to an expansion on the relationship.related_to_person_id reverse relationship // @return Relationship return $this->_objRelationshipAsRelatedTo; case '_RelationshipAsRelatedToArray': // Gets the value for the private _objRelationshipAsRelatedToArray (Read-Only) // if set due to an ExpandAsArray on the relationship.related_to_person_id reverse relationship // @return Relationship[] return (array) $this->_objRelationshipAsRelatedToArray; case '_SearchQuery': // Gets the value for the private _objSearchQuery (Read-Only) // if set due to an expansion on the search_query.person_id reverse relationship // @return SearchQuery return $this->_objSearchQuery; case '_SearchQueryArray': // Gets the value for the private _objSearchQueryArray (Read-Only) // if set due to an ExpandAsArray on the search_query.person_id reverse relationship // @return SearchQuery[] return (array) $this->_objSearchQueryArray; case '_SignupEntry': // Gets the value for the private _objSignupEntry (Read-Only) // if set due to an expansion on the signup_entry.person_id reverse relationship // @return SignupEntry return $this->_objSignupEntry; case '_SignupEntryArray': // Gets the value for the private _objSignupEntryArray (Read-Only) // if set due to an ExpandAsArray on the signup_entry.person_id reverse relationship // @return SignupEntry[] return (array) $this->_objSignupEntryArray; case '_SignupEntryAsSignupBy': // Gets the value for the private _objSignupEntryAsSignupBy (Read-Only) // if set due to an expansion on the signup_entry.signup_by_person_id reverse relationship // @return SignupEntry return $this->_objSignupEntryAsSignupBy; case '_SignupEntryAsSignupByArray': // Gets the value for the private _objSignupEntryAsSignupByArray (Read-Only) // if set due to an ExpandAsArray on the signup_entry.signup_by_person_id reverse relationship // @return SignupEntry[] return (array) $this->_objSignupEntryAsSignupByArray; case '_StewardshipContribution': // Gets the value for the private _objStewardshipContribution (Read-Only) // if set due to an expansion on the stewardship_contribution.person_id reverse relationship // @return StewardshipContribution return $this->_objStewardshipContribution; case '_StewardshipContributionArray': // Gets the value for the private _objStewardshipContributionArray (Read-Only) // if set due to an ExpandAsArray on the stewardship_contribution.person_id reverse relationship // @return StewardshipContribution[] return (array) $this->_objStewardshipContributionArray; case '_StewardshipPledge': // Gets the value for the private _objStewardshipPledge (Read-Only) // if set due to an expansion on the stewardship_pledge.person_id reverse relationship // @return StewardshipPledge return $this->_objStewardshipPledge; case '_StewardshipPledgeArray': // Gets the value for the private _objStewardshipPledgeArray (Read-Only) // if set due to an ExpandAsArray on the stewardship_pledge.person_id reverse relationship // @return StewardshipPledge[] return (array) $this->_objStewardshipPledgeArray; case '_StewardshipPostLineItem': // Gets the value for the private _objStewardshipPostLineItem (Read-Only) // if set due to an expansion on the stewardship_post_line_item.person_id reverse relationship // @return StewardshipPostLineItem return $this->_objStewardshipPostLineItem; case '_StewardshipPostLineItemArray': // Gets the value for the private _objStewardshipPostLineItemArray (Read-Only) // if set due to an ExpandAsArray on the stewardship_post_line_item.person_id reverse relationship // @return StewardshipPostLineItem[] return (array) $this->_objStewardshipPostLineItemArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }