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

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

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

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

        return true;
    }
public function preInsert ( ConnectionInterface $ con = null ) { parent :: preInsert ( $ con ) ; $ this -> dispatchEvent ( TheliaEvents :: BEFORE_CREATEADDRESS , new AddressEvent ( $ this ) ) ; return true ; }
Code to be run before inserting to database
@param  ConnectionInterface $con
@return boolean
Code to be run before inserting to database