src/Sulu/Bundle/ContactBundle/Api/Account.php
public function getMainAddress()
    {
        $accountAddresses = $this->entity->getAccountAddresses();

        if (!is_null($accountAddresses)) {
            /** @var AccountAddressEntity $accountAddress */
            foreach ($accountAddresses as $accountAddress) {
                if ($accountAddress->getMain()) {
                    return $accountAddress->getAddress();
                }
            }
        }

        return;
    }
public function getMainAddress()
    {
        $accountAddresses = $this->entity->getAccountAddresses();

        if (!is_null($accountAddresses)) {
            /** @var AccountAddressEntity $accountAddress */
            foreach ($accountAddresses as $accountAddress) {
                if ($accountAddress->getMain()) {
                    return $accountAddress->getAddress();
                }
            }
        }

        return;
    }
public function getMainAddress ( ) { $ accountAddresses = $ this -> entity -> getAccountAddresses ( ) ; if ( ! is_null ( $ accountAddresses ) ) { /** @var AccountAddressEntity $accountAddress */ foreach ( $ accountAddresses as $ accountAddress ) { if ( $ accountAddress -> getMain ( ) ) { return $ accountAddress -> getAddress ( ) ; } } } return ; }
Returns the main address.

@return mixed
@VirtualProperty
@SerializedName("mainAddress")
@Groups({"fullAccount", "partialAccount"})
Returns the main address .