public function assignAccountToParty(Account $account, AbstractParty $party)
    {
        if ($party->getAccounts()->contains($account)) {
            return;
        }
        $party->addAccount($account);

        $accountIdentifier = $this->persistenceManager->getIdentifierByObject($account);
        // We need to prevent stale object references and therefore only cache the identifier.
        $this->accountsInPartyRuntimeCache[$accountIdentifier] = $this->persistenceManager->getIdentifierByObject($party);
    }
public function assignAccountToParty(Account $account, AbstractParty $party)
    {
        if ($party->getAccounts()->contains($account)) {
            return;
        }
        $party->addAccount($account);

        $accountIdentifier = $this->persistenceManager->getIdentifierByObject($account);
        // We need to prevent stale object references and therefore only cache the identifier.
        $this->accountsInPartyRuntimeCache[$accountIdentifier] = $this->persistenceManager->getIdentifierByObject($party);
    }
public function assignAccountToParty ( Account $ account , AbstractParty $ party ) { if ( $ party -> getAccounts ( ) -> contains ( $ account ) ) { return ; } $ party -> addAccount ( $ account ) ; $ accountIdentifier = $ this -> persistenceManager -> getIdentifierByObject ( $ account ) ; // We need to prevent stale object references and therefore only cache the identifier. $ this -> accountsInPartyRuntimeCache [ $ accountIdentifier ] = $ this -> persistenceManager -> getIdentifierByObject ( $ party ) ; }
Assigns an Account to a Party

@param Account $account
@param AbstractParty $party
@return void
Assigns an Account to a Party