public function preDelete(ConnectionInterface $con = null)
    {
        parent::preDelete($con);

        if ($this->getIsDefault()) {
            return false;
        }

        $this->dispatchEvent(TheliaEvents::BEFORE_DELETEADDRESS, new AddressEvent($this));

        return true;
    }
public function preDelete(ConnectionInterface $con = null)
    {
        parent::preDelete($con);

        if ($this->getIsDefault()) {
            return false;
        }

        $this->dispatchEvent(TheliaEvents::BEFORE_DELETEADDRESS, new AddressEvent($this));

        return true;
    }
public function preDelete ( ConnectionInterface $ con = null ) { parent :: preDelete ( $ con ) ; if ( $ this -> getIsDefault ( ) ) { return false ; } $ this -> dispatchEvent ( TheliaEvents :: BEFORE_DELETEADDRESS , new AddressEvent ( $ this ) ) ; return true ; }
Code to be run before deleting the object in database
@param  ConnectionInterface $con
@return boolean
Code to be run before deleting the object in database