src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
public function processBankAccounts($contact, $bankAccounts)
    {
        $get = function($bankAccount) {
            return $bankAccount->getId();
        };

        $delete = function($bankAccounts) use ($contact) {
            $contact->removeBankAccount($bankAccounts);

            return true;
        };

        $update = function($bankAccounts, $matchedEntry) {
            return $this->updateBankAccount($bankAccounts, $matchedEntry);
        };

        $add = function($bankAccounts) use ($contact) {
            return $this->addBankAccount($contact, $bankAccounts);
        };

        $entities = $contact->getBankAccounts();

        $result = $this->processSubEntities(
            $entities,
            $bankAccounts,
            $get,
            $add,
            $update,
            $delete
        );

        $this->resetIndexOfSubentites($entities);

        return $result;
    }
public function processBankAccounts($contact, $bankAccounts)
    {
        $get = function($bankAccount) {
            return $bankAccount->getId();
        };

        $delete = function($bankAccounts) use ($contact) {
            $contact->removeBankAccount($bankAccounts);

            return true;
        };

        $update = function($bankAccounts, $matchedEntry) {
            return $this->updateBankAccount($bankAccounts, $matchedEntry);
        };

        $add = function($bankAccounts) use ($contact) {
            return $this->addBankAccount($contact, $bankAccounts);
        };

        $entities = $contact->getBankAccounts();

        $result = $this->processSubEntities(
            $entities,
            $bankAccounts,
            $get,
            $add,
            $update,
            $delete
        );

        $this->resetIndexOfSubentites($entities);

        return $result;
    }
public function processBankAccounts ( $ contact , $ bankAccounts ) { $ get = function ( $ bankAccount ) { return $ bankAccount -> getId ( ) ; } ; $ delete = function ( $ bankAccounts ) use ( $ contact ) { $ contact -> removeBankAccount ( $ bankAccounts ) ; return true ; } ; $ update = function ( $ bankAccounts , $ matchedEntry ) { return $ this -> updateBankAccount ( $ bankAccounts , $ matchedEntry ) ; } ; $ add = function ( $ bankAccounts ) use ( $ contact ) { return $ this -> addBankAccount ( $ contact , $ bankAccounts ) ; } ; $ entities = $ contact -> getBankAccounts ( ) ; $ result = $ this -> processSubEntities ( $ entities , $ bankAccounts , $ get , $ add , $ update , $ delete ) ; $ this -> resetIndexOfSubentites ( $ entities ) ; return $ result ; }
Process all bankAccounts of a request.

@param $contact
@param $bankAccounts

@return bool True if the processing was sucessful, otherwise false
Process all bankAccounts of a request .