Sulu\Bundle\ContactBundle\Contact\AbstractContactManager::getDeliveryAddress PHP Méthode

getDeliveryAddress() public méthode

Returns the delivery address.
public getDeliveryAddress ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | Contact $entity, boolean $force = false ) : mixed
$entity Sulu\Bundle\ContactBundle\Entity\AccountInterface | Sulu\Bundle\ContactBundle\Entity\Contact
$force boolean Forces function to return an address if any address is defined if no delivery address is defined it will first return the main address then any
Résultat mixed
    public function getDeliveryAddress($entity, $force = false)
    {
        /* @var Address $address */
        $conditionCallback = function ($address) {
            return $address->getDeliveryAddress();
        };
        return $this->getAddressByCondition($entity, $conditionCallback, $force);
    }