src/Sulu/Bundle/ContactBundle/Api/Contact.php
public function getAddresses()
    {
        $contactAddresses = $this->entity->getContactAddresses();
        $addresses = [];

        if (!is_null($contactAddresses)) {
            /** @var ContactAddressEntity $contactAddress */
            foreach ($contactAddresses as $contactAddress) {
                $address = $contactAddress->getAddress();
                $address->setPrimaryAddress($contactAddress->getMain());
                $addresses[] = new Address($address, $this->locale);
            }
        }

        return $addresses;
    }
public function getAddresses()
    {
        $contactAddresses = $this->entity->getContactAddresses();
        $addresses = [];

        if (!is_null($contactAddresses)) {
            /** @var ContactAddressEntity $contactAddress */
            foreach ($contactAddresses as $contactAddress) {
                $address = $contactAddress->getAddress();
                $address->setPrimaryAddress($contactAddress->getMain());
                $addresses[] = new Address($address, $this->locale);
            }
        }

        return $addresses;
    }
public function getAddresses ( ) { $ contactAddresses = $ this -> entity -> getContactAddresses ( ) ; $ addresses = [ ] ; if ( ! is_null ( $ contactAddresses ) ) { /** @var ContactAddressEntity $contactAddress */ foreach ( $ contactAddresses as $ contactAddress ) { $ address = $ contactAddress -> getAddress ( ) ; $ address -> setPrimaryAddress ( $ contactAddress -> getMain ( ) ) ; $ addresses [ ] = new Address ( $ address , $ this -> locale ) ; } } return $ addresses ; }
Returns main addresses.

@VirtualProperty
@SerializedName("addresses")
@Groups({"fullContact"})
Returns main addresses .