src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
public function deleteAddresses($entity)
    {
        // clear addresses
        if ($entity->getAccountAddresses()) {
            foreach ($entity->getAccountAddresses() as $accountAddresses) {
                $this->em->remove($accountAddresses->getAddress());
                $this->em->remove($accountAddresses);
            }
        }
    }
public function deleteAddresses($entity)
    {
        // clear addresses
        if ($entity->getAccountAddresses()) {
            foreach ($entity->getAccountAddresses() as $accountAddresses) {
                $this->em->remove($accountAddresses->getAddress());
                $this->em->remove($accountAddresses);
            }
        }
    }
public function deleteAddresses ( $ entity ) { // clear addresses if ( $ entity -> getAccountAddresses ( ) ) { foreach ( $ entity -> getAccountAddresses ( ) as $ accountAddresses ) { $ this -> em -> remove ( $ accountAddresses -> getAddress ( ) ) ; $ this -> em -> remove ( $ accountAddresses ) ; } } }
deletes all addresses that are assigned to entity.

@param $entity
deletes all addresses that are assigned to entity .