private function getOwnerInformationTabs(AccountOwnerInterface $owner, $isJoint = false) { $prefix = ''; if ($isJoint) { $prefix = 'joint_'; } $tabs = array(); $fullName = new TextTab(); $fullName->setTabLabel($prefix . 'full_name')->setValue($owner->getFullName()); $tabs[] = $fullName; $ssn = new TextTab(); $ssn->setTabLabel($prefix . 'ssn')->setValue($owner->getSsnTin()); $tabs[] = $ssn; $dob = new TextTab(); $dob->setTabLabel($prefix . 'dob')->setValue($owner->getBirthDate()->format('m-d-Y')); $tabs[] = $dob; $homeStreet = new TextTab(); $homeStreet->setTabLabel($prefix . 'home_address_street')->setValue($owner->getStreet()); $tabs[] = $homeStreet; $homeCity = new TextTab(); $homeCity->setTabLabel($prefix . 'home_address_city')->setValue($owner->getCity()); $tabs[] = $homeCity; $homeState = new TextTab(); $homeState->setTabLabel($prefix . 'home_address_state')->setValue($owner->getState() ? $owner->getState()->getName() : ''); $tabs[] = $homeState; $homeZip = new TextTab(); $homeZip->setTabLabel($prefix . 'home_address_zip')->setValue($owner->getZip()); $tabs[] = $homeZip; $primaryPhone = new TextTab(); $primaryPhone->setTabLabel($prefix . 'primary_phone_number')->setValue($owner->getPhoneNumber()); $tabs[] = $primaryPhone; $emailAddress = new TextTab(); $emailAddress->setTabLabel($prefix . 'email_address')->setValue($owner->getEmail()); $tabs[] = $emailAddress; // If is different mailing address if ($owner->getIsDifferentAddress()) { $mailingStreet = new TextTab(); $mailingStreet->setTabLabel($prefix . 'mailing_address_street')->setValue($owner->getMailingStreet()); $tabs[] = $mailingStreet; $mailingCity = new TextTab(); $mailingCity->setTabLabel($prefix . 'mailing_address_city')->setValue($owner->getMailingCity()); $tabs[] = $mailingCity; $mailingState = new TextTab(); $mailingState->setTabLabel($prefix . 'mailing_address_state')->setValue($owner->getMailingState() ? $owner->getMailingState()->getName() : ''); $tabs[] = $mailingState; $mailingZip = new TextTab(); $mailingZip->setTabLabel($prefix . 'mailing_address_zip')->setValue($owner->getMailingZip()); $tabs[] = $mailingZip; } // Check employment type $employmentType = $owner->getEmploymentType(); if ($employmentType === Profile::CLIENT_EMPLOYMENT_TYPE_RETIRED || $employmentType === Profile::CLIENT_EMPLOYMENT_TYPE_UNEMPLOYED) { $employmentStatus = new RadioGroupTab(); $employmentStatus->setGroupName($prefix . 'employment_status')->setValue(strtolower($employmentType))->setSelected(true); $tabs[] = $employmentStatus; $incomeSource = new TextTab(); $incomeSource->setTabLabel($prefix . 'source_of_income')->setValue($owner->getIncomeSource()); $tabs[] = $incomeSource; } elseif ($employmentType === Profile::CLIENT_EMPLOYMENT_TYPE_EMPLOYED || $employmentType === Profile::CLIENT_EMPLOYMENT_TYPE_SELF_EMPLOYED) { $employerName = new TextTab(); $employerName->setTabLabel($prefix . 'employer_name')->setValue($owner->getEmployerName()); $tabs[] = $employerName; $occupation = new TextTab(); $occupation->setTabLabel($prefix . 'occupation')->setValue($owner->getOccupation()); $tabs[] = $occupation; $businessType = new TextTab(); $businessType->setTabLabel($prefix . 'type_of_business')->setValue($owner->getBusinessType()); $tabs[] = $businessType; $employerStreet = new TextTab(); $employerStreet->setTabLabel($prefix . 'employer_address_street')->setValue($owner->getEmployerAddress()); $tabs[] = $employerStreet; $employerCity = new TextTab(); $employerCity->setTabLabel($prefix . 'employer_address_city')->setValue($owner->getEmploymentCity()); $tabs[] = $employerCity; $employerState = new TextTab(); $employerState->setTabLabel($prefix . 'employer_address_state')->setValue($owner->getEmploymentState() ? $owner->getEmploymentState()->getName() : ''); $tabs[] = $employerState; $employerZip = new TextTab(); $employerZip->setTabLabel($prefix . 'employer_address_zip')->setValue($owner->getEmploymentZip()); $tabs[] = $employerZip; } $isUsCitizen = new RadioGroupTab(); $isUsCitizen->setGroupName($prefix . 'is_us_citizen')->setValue('yes')->setSelected(true); $tabs[] = $isUsCitizen; if ($owner->getIsSeniorPoliticalFigure()) { $isSeniorPoliticalFigure = new CheckboxTab(); $isSeniorPoliticalFigure->setTabLabel($prefix . 'is_senior_political_figure')->setSelected(true); $fields = $owner->getSeniorSpfName() . ', ' . $owner->getSeniorPoliticalTitle() . ', ' . $owner->getSeniorAccountOwnerRelationship() . ', ' . $owner->getSeniorCountryOffice(); $spfFields = new TextTab(); $spfFields->setTabLabel($prefix . 'spf_fields')->setValue($fields); $tabs[] = $isSeniorPoliticalFigure; $tabs[] = $spfFields; } return $tabs; }