protected function isShowAccountType(RiaCompanyInformation $riaCompanyInfo) { if ($riaCompanyInfo->getAccountManaged() == 1 && !$riaCompanyInfo->getIsAllowRetirementPlan()) { return false; } return true; }
protected function buildRetirementForm(FormBuilderInterface $builder, RiaCompanyInformation $riaCompanyInfo, User $client) { $clientPortfolios = $client->getClientPortfolios(); if ($clientPortfolios->count() == 1) { if ($clientPortfolios[0]->isProposed()) { if ($riaCompanyInfo->isClientByClientManagedLevel()) { $builder->add('client_account_managed', 'choice', array('choices' => Profile::$client_account_managed_choices, 'expanded' => false, 'constraints' => array(new NotBlank(array('message' => 'Choose a Asset Location.'))))); } else { $builder->add('client_account_managed', 'hidden', array('data' => $riaCompanyInfo->getAccountManaged())); } } else { $builder->add('client_account_managed', 'choice', array('choices' => Profile::$client_account_managed_choices, 'expanded' => false, 'constraints' => array(new NotBlank(array('message' => 'Choose a Asset Location.'))), 'attr' => array('disabled' => true))); } } }