validate create and update address in front context

This commit is contained in:
Manuel Raynaud
2013-09-04 17:52:58 +02:00
parent 3cb4e6ff2e
commit ceb02841e1
21 changed files with 482 additions and 65 deletions

View File

@@ -2,7 +2,7 @@
namespace Thelia\Model;
use Symfony\Component\Config\Definition\Exception\Exception;
use Propel\Runtime\Exception\PropelException;
use Thelia\Model\AddressQuery;
use Thelia\Model\Base\Customer as BaseCustomer;
@@ -115,7 +115,7 @@ class Customer extends BaseCustomer implements UserInterface
$con->commit();
} catch(Exception $e) {
} catch(PropelException $e) {
$con->rollback();
throw $e;
}
@@ -225,7 +225,7 @@ class Customer extends BaseCustomer implements UserInterface
*/
public function preUpdate(ConnectionInterface $con = null)
{
$this->dispatchEvent(TheliaEvents::BEFORE_CHANGECUSTOMER, new CustomerEvent($this));
$this->dispatchEvent(TheliaEvents::BEFORE_UPDATECUSTOMER, new CustomerEvent($this));
return true;
}
@@ -234,7 +234,7 @@ class Customer extends BaseCustomer implements UserInterface
*/
public function postUpdate(ConnectionInterface $con = null)
{
$this->dispatchEvent(TheliaEvents::AFTER_CHANGECUSTOMER, new CustomerEvent($this));
$this->dispatchEvent(TheliaEvents::AFTER_UPDATECUSTOMER, new CustomerEvent($this));
}
/**