change text name event by using TheliaEvents constant

This commit is contained in:
Manuel Raynaud
2013-07-02 17:26:41 +02:00
parent 09e8cb4a98
commit dcb3baaf4c

View File

@@ -4,6 +4,7 @@ namespace Thelia\Model;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Thelia\Core\Event\CustomRefEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\om\BaseCustomer;
@@ -53,7 +54,7 @@ class Customer extends BaseCustomer
{
$customerRef = new CustomRefEvent($this);
if (!is_null($this->dispatcher)) {
$this->dispatcher->dispatch("customer.creation.customref", $customerRef);
$this->dispatcher->dispatch(TheliaEvents::CREATECUSTOMER_CUSTOMREF, $customerRef);
}
$this->setRef($customerRef->hasRef()? $customerRef->getRef() : $this->generateRef());