private function getAccountTypeTabValue() { $systemType = $this->account->getSystemType(); $type = $this->account->getTypeName(); $result = ''; switch ($systemType) { case SystemAccount::TYPE_PERSONAL_INVESTMENT: $result = 'individual'; break; case SystemAccount::TYPE_JOINT_INVESTMENT: $result = 'joint'; break; case SystemAccount::TYPE_ROTH_IRA: $result = 'roth_ira'; break; case SystemAccount::TYPE_TRADITIONAL_IRA: if ($type == 'SEP IRA') { $result = 'sep_ira'; } elseif ($type == 'SIMPLE IRA') { $result = 'simple_ira'; } else { $result = 'traditional_or_rollover_ira'; } break; case SystemAccount::TYPE_RETIREMENT: $result = 'qualified_retirement_plan'; break; } return $result; }
/** * Get transfer screen steps configuration object by client account * * @param ClientAccount $account * @return TransferStepsConfigurationInterface * @throws \InvalidArgumentException */ private function getStepsConfiguration(ClientAccount $account) { $type = $account->getSystemType(); switch ($type) { case SystemAccount::TYPE_PERSONAL_INVESTMENT: $stepsConfiguration = new PersonalAccountConfiguration($this->adm, $account); break; case SystemAccount::TYPE_JOINT_INVESTMENT: $stepsConfiguration = new JointAccountConfiguration($this->adm, $account); break; case SystemAccount::TYPE_TRADITIONAL_IRA: $stepsConfiguration = new TraditionalIraAccountConfiguration($this->adm, $account); break; case SystemAccount::TYPE_ROTH_IRA: $stepsConfiguration = new RothIraAccountConfiguration($this->adm, $account); break; case SystemAccount::TYPE_RETIREMENT: $stepsConfiguration = new RetirementAccountConfiguration($this->adm, $account); break; default: throw new \InvalidArgumentException(sprintf('Invalid value of account system_type: $s.', $type)); break; } return $stepsConfiguration; }
/** * Get type of account tab value * * @param ClientAccount $account * @return string */ private function getAccountTypeTabValue(ClientAccount $account) { $systemType = $account->getSystemType(); $type = $account->getTypeName(); switch ($systemType) { case SystemAccount::TYPE_ROTH_IRA: $result = 'roth_ira'; break; case SystemAccount::TYPE_TRADITIONAL_IRA: if ($type == 'SEP IRA') { $result = 'sep_ira'; } elseif ($type == 'SIMPLE IRA') { $result = 'simple_ira'; } else { $result = 'traditional_ira'; } break; default: $result = ''; break; } return $result; }
/** * Get system_type * * @return integer */ public function getSystemType() { return parent::getSystemType(); }