/** * Create new account outside fund * * @param ClientAccount $account * @param SecurityAssignment $securityAssignment * @param $isPreferred * @return AccountOutsideFund */ protected function createAccountAssociation(ClientAccount $account, SecurityAssignment $securityAssignment, $isPreferred) { $accountAssociation = new AccountOutsideFund(); $accountAssociation->setAccount($account); $accountAssociation->setSecurityAssignment($securityAssignment); $accountAssociation->setIsPreferred($isPreferred); $this->em->persist($accountAssociation); $this->em->flush(); return $accountAssociation; }
protected function updateAccountAssociation(AccountOutsideFund $association, $isPreferred) { $association->setIsPreferred($isPreferred); $this->em->persist($association); $this->em->flush(); }