create new customerEvent class

This commit is contained in:
Manuel Raynaud
2013-08-16 10:35:46 +02:00
parent 1db41a36ab
commit 44249859ef
3 changed files with 159 additions and 14 deletions

View File

@@ -24,6 +24,7 @@ namespace Thelia\Controller\Front;
use Thelia\Core\Event\CustomerEvent;
use Thelia\Core\Security\SecurityContext;
use Thelia\Form\CustomerCreation;
use Thelia\Model\Customer;
use Thelia\Core\Event\TheliaEvents;
@@ -31,16 +32,10 @@ class CustomerController extends BaseFrontController
{
public function createAction()
{
$request = $this->getRequest();
$customerCreation = new CustomerCreation($$request);
$event = $this->dispatchEvent("createCustomer");
if (null !== $customer = $event->customer) {
$this->processLogin($event->customer);
}
}
public function displayCreateAction()
{
$form = $this->validateForm($customerCreation, "post");
}