예제 #1
0
 /**
  * Remove accountAssociations
  *
  * @param \Wealthbot\ClientBundle\Entity\AccountOutsideFund $accountAssociations
  */
 public function removeAccountAssociation(\Wealthbot\ClientBundle\Entity\AccountOutsideFund $accountAssociations)
 {
     $this->accountAssociations->removeElement($accountAssociations);
 }
 /**
  * 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();
 }