Sulu\Bundle\ContactBundle\Contact\AbstractContactManager::getDeliveryAddress PHP 메소드

getDeliveryAddress() 공개 메소드

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
리턴 mixed
    public function getDeliveryAddress($entity, $force = false)
    {
        /* @var Address $address */
        $conditionCallback = function ($address) {
            return $address->getDeliveryAddress();
        };
        return $this->getAddressByCondition($entity, $conditionCallback, $force);
    }